test: add missing sync to p2p_tx_download.py #31837

pull mzumsande wants to merge 1 commits into bitcoin:master from mzumsande:202502_txtest_missing_sync changing 1 files +1 −0
  1. mzumsande commented at 6:41 pm on February 10, 2025: contributor

    If the node hasn’t processed the inv from the outbound peer before the mocktime bump, the peer won’t be preferred after the other inv timeouts, failing the test . Therefore, add a sync, just like there is one after the send_message calls in the previous lines.

    Fixes #31833

  2. DrahtBot commented at 6:41 pm on February 10, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/31837.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK instagibbs, maflcko

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  3. DrahtBot added the label Tests on Feb 10, 2025
  4. test: add missing sync to p2p_tx_download.py
    This prevents intermittent failures - if the node hasn't processed
    the inv from the outbound peer before the mocktime bump, the peer
    won't be preferred after the other inv timeouts, failing the test .
    Therefore, add a sync, just like there is one after the send_message
    calls in the previous lines.
    8fe552fe6e
  5. mzumsande force-pushed on Feb 10, 2025
  6. in test/functional/p2p_tx_download.py:277 in 8fe552fe6e
    273@@ -274,6 +274,7 @@ def test_preferred_tiebreaker_inv(self):
    274         pref_peer = self.nodes[0].add_outbound_p2p_connection(
    275            TestP2PConn(), wait_for_verack=True, p2p_idx=1, connection_type="outbound-full-relay")
    276         pref_peer.send_message(msg_inv([CInv(t=MSG_WTX, h=0xff00ff00)]))
    277+        pref_peer.sync_with_ping()
    


    instagibbs commented at 9:42 pm on February 10, 2025:
    could also send_and_ping

    maflcko commented at 7:44 am on February 11, 2025:
    There are not many remaining cases of send_message, so in theory it could be renamed to send_without_ping to make the misuse more apparent? Though, that’d be a follow-up.

    mzumsande commented at 3:34 pm on February 11, 2025:

    didn’t get to it before merge.

    not many remaining cases

    well, I count ~130 still, so definitely some churn involved changing most of these. Still, it would make sense to me.


    instagibbs commented at 3:35 pm on February 11, 2025:
    seems to cause quite a few nuisance issues in tests, may be worth it going forward
  7. instagibbs approved
  8. instagibbs commented at 9:43 pm on February 10, 2025: member
    ACK 8fe552fe6e0f1fb3600d4c5bc53b4873def6e94e
  9. maflcko added this to the milestone 29.0 on Feb 11, 2025
  10. maflcko commented at 7:44 am on February 11, 2025: member
    lgtm ACK 8fe552fe6e0f1fb3600d4c5bc53b4873def6e94e
  11. fanquake merged this on Feb 11, 2025
  12. fanquake closed this on Feb 11, 2025

  13. mzumsande deleted the branch on Feb 11, 2025
  14. sedited referenced this in commit f78a01a560 on Feb 22, 2025
  15. fanquake referenced this in commit ca05b28710 on Mar 16, 2025
  16. stickies-v referenced this in commit d760fd3dda on Mar 17, 2025
  17. stickies-v referenced this in commit cc83553352 on Mar 17, 2025
  18. stickies-v referenced this in commit 2614933f06 on Mar 17, 2025
  19. stickies-v referenced this in commit b70418c5fc on Mar 17, 2025
  20. stickies-v referenced this in commit 69f8a1fe50 on Mar 17, 2025
  21. bug-castercv502 referenced this in commit d15545ffaa on Sep 28, 2025
  22. bitcoin locked this on Feb 11, 2026

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-03-03 06:13 UTC

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