| 1203 | } |
| 1204 | |
| 1205 | static void json_add_local_update(struct json_stream *response, |
| 1206 | const char *fieldname, |
| 1207 | const struct local_update *lu) |
| 1208 | { |
| 1209 | json_object_start(response, fieldname); |
| 1210 | json_add_short_channel_id_dir(response, "short_channel_id_dir", |
| 1211 | lu->scidd); |
| 1212 | if (lu->enabled) |
| 1213 | json_add_bool(response, "enabled", *lu->enabled); |
| 1214 | if (lu->htlc_min) |
| 1215 | json_add_amount_msat(response, |
| 1216 | "htlc_minimum_msat", *lu->htlc_min); |
| 1217 | if (lu->htlc_max) |
| 1218 | json_add_amount_msat(response, |
| 1219 | "htlc_maximum_msat", *lu->htlc_max); |
| 1220 | if (lu->base_fee) |
| 1221 | json_add_amount_msat(response, "fee_base_msat", *lu->base_fee); |
| 1222 | if (lu->proportional_fee) |
| 1223 | json_add_u32(response, |
| 1224 | "fee_proportional_millionths", |
| 1225 | *lu->proportional_fee); |
| 1226 | if (lu->delay) |
| 1227 | json_add_u32(response, "cltv_expiry_delta", *lu->delay); |
| 1228 | json_object_end(response); |
| 1229 | } |
| 1230 | |
| 1231 | void json_add_constraint(struct json_stream *js, |
| 1232 | const char *fieldname, |
no test coverage detected