| 1461 | } |
| 1462 | |
| 1463 | static struct channel_id *chan_for_node_index(const tal_t *ctx, |
| 1464 | struct splice_script_chan **channels, |
| 1465 | struct node_id node_id, |
| 1466 | size_t channel_index) |
| 1467 | { |
| 1468 | for (size_t i = 0; i < tal_count(channels); i++) |
| 1469 | if (node_id_eq(&node_id, &channels[i]->node_id)) |
| 1470 | if (channel_index-- == 0) |
| 1471 | return tal_dup(ctx, struct channel_id, |
| 1472 | &channels[i]->chan_id); |
| 1473 | return NULL; |
| 1474 | } |
| 1475 | |
| 1476 | static struct channel_id **unused_chans(const tal_t *ctx, |
| 1477 | struct splice_script_chan **channels, |
no test coverage detected