mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
test_v2_open_sigs_restart: dont mine blocks until funding tx in mempool
This was flaky because sometimes we'd generate blocks before the funding transaction reached the mempool. If we wait until it's in, it works as expected. [ Neatened to use wait_for_mempool arg --RR ]
This commit is contained in:
@@ -137,7 +137,8 @@ def test_v2_open_sigs_restart(node_factory, bitcoind):
|
|||||||
l1.rpc.openchannel_signed(chan_id, psbt)
|
l1.rpc.openchannel_signed(chan_id, psbt)
|
||||||
|
|
||||||
l2.daemon.wait_for_log('Broadcasting funding tx')
|
l2.daemon.wait_for_log('Broadcasting funding tx')
|
||||||
bitcoind.generate_block(6)
|
txid = l2.rpc.listpeers(l1.info['id'])['peers'][0]['channels'][0]['funding_txid']
|
||||||
|
bitcoind.generate_block(6, wait_for_mempool=txid)
|
||||||
|
|
||||||
# Make sure we're ok.
|
# Make sure we're ok.
|
||||||
l2.daemon.wait_for_log(r'to CHANNELD_NORMAL')
|
l2.daemon.wait_for_log(r'to CHANNELD_NORMAL')
|
||||||
|
|||||||
Reference in New Issue
Block a user