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

Function gossmap_scidd_pubkey

common/gossmap.c:1827–1845  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1825}
1826
1827bool gossmap_scidd_pubkey(struct gossmap *gossmap,
1828 struct sciddir_or_pubkey *sciddpk)
1829{
1830 struct gossmap_chan *chan;
1831 struct gossmap_node *node;
1832 struct node_id id;
1833
1834 if (sciddpk->is_pubkey)
1835 return true;
1836
1837 chan = gossmap_find_chan(gossmap, &sciddpk->scidd.scid);
1838 if (!chan)
1839 return false;
1840
1841 node = gossmap_nth_node(gossmap, chan, sciddpk->scidd.dir);
1842 gossmap_node_get_id(gossmap, node, &id);
1843 /* Shouldn't fail! */
1844 return sciddir_or_pubkey_from_node_id(sciddpk, &id);
1845}
1846
1847u64 gossmap_lengths(const struct gossmap *map, u64 *total)
1848{

Callers 6

listoffers_doneFunction · 0.85
json_payFunction · 0.85
try_establishFunction · 0.85
param_pathsFunction · 0.85
send_onion_replyFunction · 0.85
xpay_coreFunction · 0.85

Calls 4

gossmap_find_chanFunction · 0.85
gossmap_nth_nodeFunction · 0.85
gossmap_node_get_idFunction · 0.85

Tested by

no test coverage detected