Skip to content

Commit 3c87e1f

Browse files
niftyneirustyrussell
authored andcommitted
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 ]
1 parent 66a2826 commit 3c87e1f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_opening.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ def test_v2_open_sigs_restart(node_factory, bitcoind):
137137
l1.rpc.openchannel_signed(chan_id, psbt)
138138

139139
l2.daemon.wait_for_log('Broadcasting funding tx')
140-
bitcoind.generate_block(6)
140+
txid = l2.rpc.listpeers(l1.info['id'])['peers'][0]['channels'][0]['funding_txid']
141+
bitcoind.generate_block(6, wait_for_mempool=txid)
141142

142143
# Make sure we're ok.
143144
l2.daemon.wait_for_log(r'to CHANNELD_NORMAL')

0 commit comments

Comments
 (0)