Skip to content

Commit aedea77

Browse files
rustyrussellcdecker
authored andcommitted
pytest: try to prevent spurious timeouts in test_channel_lease_unilat_closes
Generating 4032 blocks takes a while, so do it in four parts. Signed-off-by: Rusty Russell <[email protected]>
1 parent 2b07d0b commit aedea77

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_closing.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -932,8 +932,10 @@ def test_channel_lease_unilat_closes(node_factory, bitcoind):
932932
# we *can* spend the 1csv lock one
933933
l2.rpc.withdraw(l2.rpc.newaddr()['bech32'], "all", utxos=[utxo3])
934934

935-
bitcoind.generate_block(4032)
936-
sync_blockheight(bitcoind, [l2, l3])
935+
# This can timeout, so do it in four easy stages.
936+
for i in range(4):
937+
bitcoind.generate_block(4032 // 4)
938+
sync_blockheight(bitcoind, [l2, l3])
937939

938940
l2.rpc.withdraw(l2.rpc.newaddr()['bech32'], "all", utxos=[utxo1])
939941

0 commit comments

Comments
 (0)