Fixes #27860
The problem was that the replacement tx tx_b
would sometimes be sent out to the inbound peer after the notfound
, so that threre would be an unexpected tx
message and the test fails.
0 node0 2023-06-12T12:48:24.903204Z [msghand] [net.cpp:2856] [PushMessage] [net] sending notfound (73 bytes) peer=1
1 node0 2023-06-12T12:48:24.903916Z [msghand] [net.cpp:2856] [PushMessage] [net] sending tx (133 bytes) peer=1
2 File "/tmp/cirrus-ci-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/test/functional/p2p_leak_tx.py", line 74, in test_notfound_on_replaced_tx
3 assert "tx" not in inbound_peer.last_message
Fix this by letting the peer wait for the initial broadcast of the replacement tx before continuing with the test.