mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
pytest: wait_channel_quiescent helper to wait for resolved htlcs.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
9fa7f5e30e
commit
a90c200fcb
@@ -70,6 +70,11 @@ def sync_blockheight(bitcoind, nodes):
|
|||||||
wait_for(lambda: n.rpc.getinfo()['blockheight'] == height)
|
wait_for(lambda: n.rpc.getinfo()['blockheight'] == height)
|
||||||
|
|
||||||
|
|
||||||
|
def wait_channel_quiescent(n1, n2):
|
||||||
|
wait_for(lambda: only_one(only_one(n1.rpc.listpeers(n2.info['id'])['peers'])['channels'])['htlcs'] == [])
|
||||||
|
wait_for(lambda: only_one(only_one(n2.rpc.listpeers(n1.info['id'])['peers'])['channels'])['htlcs'] == [])
|
||||||
|
|
||||||
|
|
||||||
class TailableProc(object):
|
class TailableProc(object):
|
||||||
"""A monitorable process that we can start, stop and tail.
|
"""A monitorable process that we can start, stop and tail.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user