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:
niftynei
2021-03-22 15:46:08 -05:00
committed by Rusty Russell
parent 66a2826976
commit 3c87e1f338

View File

@@ -137,7 +137,8 @@ def test_v2_open_sigs_restart(node_factory, bitcoind):
l1.rpc.openchannel_signed(chan_id, psbt)
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.
l2.daemon.wait_for_log(r'to CHANNELD_NORMAL')