| 1342 | } |
| 1343 | |
| 1344 | void json_add_layers(struct json_stream *js, |
| 1345 | const struct askrene *askrene, |
| 1346 | const char *fieldname, |
| 1347 | const struct layer *layer) |
| 1348 | { |
| 1349 | json_array_start(js, fieldname); |
| 1350 | if (layer) { |
| 1351 | json_add_layer(js, NULL, layer); |
| 1352 | } else { |
| 1353 | struct layer_name_hash_iter it; |
| 1354 | |
| 1355 | for (struct layer *l = layer_name_hash_first(askrene->layers, &it); |
| 1356 | l; |
| 1357 | l = layer_name_hash_next(askrene->layers, &it)) { |
| 1358 | json_add_layer(js, NULL, l); |
| 1359 | } |
| 1360 | } |
| 1361 | json_array_end(js); |
| 1362 | } |
| 1363 | |
| 1364 | bool layer_created(const struct layer *layer, struct short_channel_id scid) |
| 1365 | { |
no test coverage detected