pytest: wait_channel_quiescent helper to wait for resolved htlcs.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
9fa7f5e30e
commit
a90c200fcb
|
@ -70,6 +70,11 @@ def sync_blockheight(bitcoind, nodes):
|
|||
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):
|
||||
"""A monitorable process that we can start, stop and tail.
|
||||
|
||||
|
|
Loading…
Reference in New Issue