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

Function scid_dir

tests/test_askrene.py:26–29  ·  view source on GitHub ↗

Get short_channel_id_dir for a channel in generate_gossip_store format

(nodemap, node1_idx, node2_idx, chan_idx)

Source from the content-addressed store, hash-verified

24
25
26def scid_dir(nodemap, node1_idx, node2_idx, chan_idx):
27 """Get short_channel_id_dir for a channel in generate_gossip_store format"""
28 dir_val = direction(nodemap[node1_idx], nodemap[node2_idx])
29 return f"{node1_idx}x{node2_idx}x{chan_idx}/{dir_val}"
30
31
32def test_reserve(node_factory):

Callers

nothing calls this directly

Calls 1

directionFunction · 0.70

Tested by

no test coverage detected