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

Function gossmap_node_get_id

common/gossmap.c:1444–1454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1442}
1443
1444void gossmap_node_get_id(const struct gossmap *map,
1445 const struct gossmap_node *node,
1446 struct node_id *id)
1447{
1448 /* We extract nodeid from first channel. */
1449 int dir;
1450 struct gossmap_chan *c = gossmap_nth_chan(map, node, 0, &dir);
1451
1452 map_nodeid(map, c->cann_off + c->plus_scid_off
1453 + 8 + PUBKEY_CMPR_LEN*dir, id);
1454}
1455
1456bool gossmap_chan_is_localmod(const struct gossmap *map,
1457 const struct gossmap_chan *c)

Callers 15

process_channel_updateFunction · 0.85
get_random_nodeFunction · 0.85
forward_htlcFunction · 0.85
dijkstra_to_hopsFunction · 0.85
nodeidx_idFunction · 0.85
gossmap_scidd_pubkeyFunction · 0.85
mainFunction · 0.85
dst_is_excludedFunction · 0.85
do_check_gossipFunction · 0.85
can_carryFunction · 0.85
json_add_halfchanFunction · 0.85

Calls 2

gossmap_nth_chanFunction · 0.85
map_nodeidFunction · 0.85

Tested by 1

mainFunction · 0.68