| 1313 | } |
| 1314 | |
| 1315 | void json_add_layers(struct json_stream *js, |
| 1316 | const struct askrene *askrene, |
| 1317 | const char *fieldname, |
| 1318 | const struct layer *layer) |
| 1319 | { |
| 1320 | json_array_start(js, fieldname); |
| 1321 | if (layer) { |
| 1322 | json_add_layer(js, NULL, layer); |
| 1323 | } else { |
| 1324 | struct layer_name_hash_iter it; |
| 1325 | |
| 1326 | for (struct layer *l = layer_name_hash_first(askrene->layers, &it); |
| 1327 | l; |
| 1328 | l = layer_name_hash_next(askrene->layers, &it)) { |
| 1329 | json_add_layer(js, NULL, l); |
| 1330 | } |
| 1331 | } |
| 1332 | json_array_end(js); |
| 1333 | } |
| 1334 | |
| 1335 | bool layer_created(const struct layer *layer, struct short_channel_id scid) |
| 1336 | { |
no test coverage detected