mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 00:24:19 +01:00
pytest: fix assumption in test_onchain_their_unilateral_out
In fact, the 5 blocks generate above were not seen by nodes until later, making me very confused. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
02b413a4dc
commit
7aa40b6bae
@@ -1519,6 +1519,7 @@ def test_onchain_their_unilateral_out(node_factory, bitcoind):
|
|||||||
|
|
||||||
bitcoind.generate_block(5)
|
bitcoind.generate_block(5)
|
||||||
l1.wait_channel_active(c12)
|
l1.wait_channel_active(c12)
|
||||||
|
sync_blockheight(bitcoind, [l1, l2])
|
||||||
|
|
||||||
route = l2.rpc.getroute(l1.info['id'], 10**8, 1)["route"]
|
route = l2.rpc.getroute(l1.info['id'], 10**8, 1)["route"]
|
||||||
assert len(route) == 1
|
assert len(route) == 1
|
||||||
@@ -1545,8 +1546,8 @@ def test_onchain_their_unilateral_out(node_factory, bitcoind):
|
|||||||
l1.daemon.wait_for_log(' to ONCHAIN')
|
l1.daemon.wait_for_log(' to ONCHAIN')
|
||||||
l2.daemon.wait_for_log('THEIR_UNILATERAL/OUR_HTLC')
|
l2.daemon.wait_for_log('THEIR_UNILATERAL/OUR_HTLC')
|
||||||
|
|
||||||
# l2 should wait til to_self_delay (6), then fulfill onchain
|
# l2 should wait til to_self_delay (10), then fulfill onchain
|
||||||
l1.bitcoin.generate_block(5)
|
l1.bitcoin.generate_block(9)
|
||||||
l2.wait_for_onchaind_broadcast('OUR_HTLC_TIMEOUT_TO_US',
|
l2.wait_for_onchaind_broadcast('OUR_HTLC_TIMEOUT_TO_US',
|
||||||
'THEIR_UNILATERAL/OUR_HTLC')
|
'THEIR_UNILATERAL/OUR_HTLC')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user