Skip to content

Commit 4ba7fab

Browse files
committed
pytest: fix flake in test_channel_lease_unilat_closes
We need to make sure the lease starts a the block we expect: ``` # Note that l3 has the whole lease delay (minus blocks already mined) _, _, l3blocks = l3.wait_for_onchaind_tx('OUR_DELAYED_RETURN_TO_WALLET', 'OUR_UNILATERAL/DELAYED_OUTPUT_TO_US') > assert l3blocks == 4032 - 6 - 2 - 1 E assert 4022 == (((4032 - 6) - 2) - 1) tests/test_closing.py:985: AssertionError ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent 5a855b8 commit 4ba7fab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_closing.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -932,6 +932,9 @@ def test_channel_lease_unilat_closes(node_factory, bitcoind):
932932
l2.fundwallet(20000000)
933933
l3.fundwallet(20000000)
934934

935+
# Make sure we are at known height for lease.
936+
sync_blockheight(bitcoind, [l1, l2, l3])
937+
935938
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
936939
rates = l1.rpc.dev_queryrates(l2.info['id'], amount, amount)
937940
# l1 leases a channel from l2

0 commit comments

Comments
 (0)