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

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: 2025-02-22 06:12 UTC

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