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

Function get_funded_channel_scid

tests/test_connection.py:2243–2250  ·  view source on GitHub ↗
(n1, n2)

Source from the content-addressed store, hash-verified

2241 # open again, so multiple channels may remain
2242 # listed.
2243 def get_funded_channel_scid(n1, n2):
2244 channels = n1.rpc.listpeerchannels(n2.info['id'])['channels']
2245 assert channels
2246 for c in channels:
2247 state = c['state']
2248 if state in ('CHANNELD_AWAITING_LOCKIN', 'CHANNELD_NORMAL'):
2249 return c['short_channel_id']
2250 assert False
2251
2252 # Now close channels to l2 and l4, for the next run.
2253 l1.rpc.close(get_funded_channel_scid(l1, l2))

Callers 1

Calls 1

listpeerchannelsMethod · 0.80

Tested by

no test coverage detected