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

Function has_normal_channels

tests/test_connection.py:1650–1655  ·  view source on GitHub ↗
(l1, l2)

Source from the content-addressed store, hash-verified

1648 remote_valid_addr = 'bcrt1q7gtnxmlaly9vklvmfj06amfdef3rtnrdazdsvw'
1649
1650 def has_normal_channels(l1, l2):
1651 if l1.rpc.listpeers(l2.info['id'])['peers'] == []:
1652 return False
1653 return any([c['state'] == 'CHANNELD_AWAITING_LOCKIN'
1654 or c['state'] == 'CHANNELD_NORMAL'
1655 for c in l1.rpc.listpeerchannels(l2.info['id'])['channels']])
1656
1657 def _fundchannel(l1, l2, amount, close_to):
1658 l1.rpc.connect(l2.info['id'], 'localhost', l2.port)

Callers 1

_fundchannelFunction · 0.85

Calls 3

listpeerchannelsMethod · 0.80
anyClass · 0.50
listpeersMethod · 0.45

Tested by

no test coverage detected