| 1174 | } |
| 1175 | |
| 1176 | static void json_add_local_update(struct json_stream *response, |
| 1177 | const char *fieldname, |
| 1178 | const struct local_update *lu) |
| 1179 | { |
| 1180 | json_object_start(response, fieldname); |
| 1181 | json_add_short_channel_id_dir(response, "short_channel_id_dir", |
| 1182 | lu->scidd); |
| 1183 | if (lu->enabled) |
| 1184 | json_add_bool(response, "enabled", *lu->enabled); |
| 1185 | if (lu->htlc_min) |
| 1186 | json_add_amount_msat(response, |
| 1187 | "htlc_minimum_msat", *lu->htlc_min); |
| 1188 | if (lu->htlc_max) |
| 1189 | json_add_amount_msat(response, |
| 1190 | "htlc_maximum_msat", *lu->htlc_max); |
| 1191 | if (lu->base_fee) |
| 1192 | json_add_amount_msat(response, "fee_base_msat", *lu->base_fee); |
| 1193 | if (lu->proportional_fee) |
| 1194 | json_add_u32(response, |
| 1195 | "fee_proportional_millionths", |
| 1196 | *lu->proportional_fee); |
| 1197 | if (lu->delay) |
| 1198 | json_add_u32(response, "cltv_expiry_delta", *lu->delay); |
| 1199 | json_object_end(response); |
| 1200 | } |
| 1201 | |
| 1202 | void json_add_constraint(struct json_stream *js, |
| 1203 | const char *fieldname, |
no test coverage detected