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
  1. Crypt-iQ commented at 5:06 PM on November 16, 2026: contributor

    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().

  2. 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().
    e556dc1ef1
  3. DrahtBot added the label Tests on Nov 16, 2026
  4. 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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process. A summary of reviews will appear here.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. 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
    
  6. fanquake requested review from instagibbs on Nov 17, 2026
  7. fanquake requested review from mzumsande on Nov 17, 2026
Contributors


instagibbsmzumsande

Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-11-18 16:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me