MCPcopy Create free account
hub / github.com/ElementsProject/lightning / chan_for_node_index

Function chan_for_node_index

common/splice_script.c:1463–1474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1461}
1462
1463static 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
1476static struct channel_id **unused_chans(const tal_t *ctx,
1477 struct splice_script_chan **channels,

Callers 1

resolve_channel_idsFunction · 0.85

Calls 1

node_id_eqFunction · 0.85

Tested by

no test coverage detected