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

Function gossmap_scidd_pubkey

common/gossmap.c:1821–1839  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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