Skip to content

Commit 39ca910

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 76eabcc commit 39ca910

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
@@ -4045,6 +4045,7 @@ def test_peer_anchor_push(node_factory, bitcoind, executor, chainparams):
40454045
# As blocks pass, we will use anchor to boost l3's tx.
40464046
for block, feerate in zip(range(120, 124), (12000, 13000, 14000, 15000)):
40474047
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")
4048+
l2.daemon.wait_for_log("sendrawtx exit 0")
40484049
# Check feerate for entire package (commitment tx + anchor) is ~ correct
40494050
details = bitcoind.rpc.getrawmempool(True).values()
40504051
total_weight = sum([d['weight'] for d in details])

0 commit comments

Comments
 (0)