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

Function count_active

tests/test_gossip.py:95–99  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

93 bitcoind.generate_block(5)
94
95 def count_active(node):
96 chans = node.rpc.listchannels()['channels']
97 active = [c for c in chans if c['active']]
98 connected = len([p for p in node.rpc.listpeerchannels()['channels'] if p['peer_connected'] is True])
99 return connected * len(active)
100
101 l1.wait_channel_active(scid)
102 l2.wait_channel_active(scid)

Callers 1

Calls 2

listpeerchannelsMethod · 0.80
listchannelsMethod · 0.45

Tested by

no test coverage detected