Skip to content

Commit 59a29a4

Browse files
committed
pytest: fix race in test_peer_anchor_push.
We have to make sure the new tx has been received by bitcoind, otherwise we could be examining the previous: ``` > check_feerate(l2, total_feerate_perkw, feerate) tests/test_closing.py:4053: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ node = <fixtures.LightningNode object at 0x7f645789ee90> actual_feerate = 14000.0, expected_feerate = 15000 def check_feerate(node, actual_feerate, expected_feerate): # Feerate can't be lower. > assert actual_feerate > expected_feerate - 2 ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent 07d8c60 commit 59a29a4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tests/test_closing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4042,6 +4042,7 @@ def test_peer_anchor_push(node_factory, bitcoind, executor, chainparams):
40424042
# As blocks pass, we will use anchor to boost l3's tx.
40434043
for block, feerate in zip(range(120, 124), (12000, 13000, 14000, 15000)):
40444044
l2.daemon.wait_for_log(fr"Worth fee [0-9]*sat for remote commit tx to get 100000000msat at block 125 \(\+{125 - block}\) at feerate {feerate}perkw")
4045+
l2.daemon.wait_for_log("sendrawtx exit 0")
40454046
# Check feerate for entire package (commitment tx + anchor) is ~ correct
40464047
details = bitcoind.rpc.getrawmempool(True).values()
40474048
total_weight = sum([d['weight'] for d in details])

0 commit comments

Comments
 (0)