mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
connect test: use wait_for_log in test_funding_external_wallet
test_funding_external_wallet is flakey because we don't wait for the channel state to update before asserting that it's changed.
This commit is contained in:
committed by
Rusty Russell
parent
77018e6200
commit
92bd3a3587
@@ -896,11 +896,10 @@ def test_funding_external_wallet(node_factory, bitcoind):
|
||||
bitcoind.generate_block(1)
|
||||
|
||||
l1.daemon.wait_for_log(r'Funding tx {} depth 1 of 1'.format(txid))
|
||||
l1.daemon.wait_for_log(r'State changed from CHANNELD_AWAITING_LOCKIN to CHANNELD_NORMAL')
|
||||
|
||||
for node in [l1, l2]:
|
||||
node.daemon.wait_for_log(r'State changed from CHANNELD_AWAITING_LOCKIN to CHANNELD_NORMAL')
|
||||
channel = node.rpc.listpeers()['peers'][0]['channels'][0]
|
||||
assert 'CHANNELD_NORMAL' == channel['state']
|
||||
assert amount * 1000 == channel['msatoshi_total']
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user