Because nodes[1] time was not mocked in test_block_inv, it was possible for wall clock to advance 2s by the time nodes[0] had delivered a tx announcement to it. Then, nodes[1] would request the tx from a test peer, never receive the tx, and fail in sync_mempools().
test: fix intermittent failure in p2p_tx_download.py #36891
pull Crypt-iQ wants to merge 1 commits into bitcoin:master from Crypt-iQ:2026-11/txdownload-flake changing 1 files +4 −1-
Crypt-iQ commented at 5:06 PM on November 16, 2026: contributor
-
e556dc1ef1
test: fix intermittent failure in p2p_tx_download.py
Because nodes[1] time was not mocked in test_block_inv, it was possible for wall clock to advance 2s by the time nodes[0] had delivered a tx announcement to it. Then, nodes[1] would request the tx from a test peer, never receive the tx, and fail in sync_mempools().
- DrahtBot added the label Tests on Nov 16, 2026
-
DrahtBot commented at 5:06 PM on November 16, 2026: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
External sites
- Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/36891
- Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/36891.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/36891#author-ralph
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline and AI policy for information on the review process. A summary of reviews will appear here.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
-
Crypt-iQ commented at 5:08 PM on November 16, 2026: contributor
It's possible to simulate
nodes[1]not running with the following diff on 8130b3b8836879915e82730eb818ee6b58c28168:diff --git a/test/functional/p2p_tx_download.py b/test/functional/p2p_tx_download.py index aa43cc18e2..4a83e44b91 100755 --- a/test/functional/p2p_tx_download.py +++ b/test/functional/p2p_tx_download.py @@ -116,6 +116,8 @@ class TxDownloadTest(BitcoinTestFramework): self.log.info("Put the tx in node 0's mempool") self.nodes[0].sendrawtransaction(tx['hex']) + time.sleep(2) + # Since node 1 is connected outbound to an honest peer (node 0), it # should get the tx within a timeout. # However, node 0 sees the same connection as inbound, so it may not - fanquake requested review from instagibbs on Nov 17, 2026
- fanquake requested review from mzumsande on Nov 17, 2026