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

Function has_normal_channels

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

Source from the content-addressed store, hash-verified

1593 remote_valid_addr = 'bcrt1q7gtnxmlaly9vklvmfj06amfdef3rtnrdazdsvw'
1594
1595 def has_normal_channels(l1, l2):
1596 if l1.rpc.listpeers(l2.info['id'])['peers'] == []:
1597 return False
1598 return any([c['state'] == 'CHANNELD_AWAITING_LOCKIN'
1599 or c['state'] == 'CHANNELD_NORMAL'
1600 for c in only_one(l1.rpc.listpeers(l2.info['id'])['peers'])['channels']])
1601
1602 def _fundchannel(l1, l2, amount, close_to):
1603 l1.rpc.connect(l2.info['id'], 'localhost', l2.port)

Callers 1

_fundchannelFunction · 0.85

Calls 3

only_oneFunction · 0.90
anyClass · 0.50
listpeersMethod · 0.45

Tested by

no test coverage detected