test: Fix intermittent failure in rpc_net.py #26553

pull mzumsande wants to merge 1 commits into bitcoin:master from mzumsande:202211_test_disconnect_wait changing 2 files +5 −3
  1. mzumsande commented at 11:14 PM on November 21, 2022: contributor

    Fixes #26552.

    The problem was that calling disconnect_p2ps waits until self.num_test_p2p_connections() == 0. num_test_p2p_connections() checks the field subver in getpeerinfo to distinguish p2p nodes from full nodes. However, if we are dealing with a p2p connection that has never sent a version, the node has never received the special subversion and the wait is ineffective (we continue even though the disconnection is not yet completed).

    Fix this by not using disconnect_p2ps.

  2. test: Fix intermittent failure in rpc_net.py
    The wait in disconnect_p2ps checked for subver, which
    is unavailable for the peer that didn't send a version msg.
    0f6cd72237
  3. DrahtBot commented at 11:14 PM on November 21, 2022: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK MarcoFalke
  4. DrahtBot added the label Tests on Nov 21, 2022
  5. maflcko commented at 10:21 AM on November 22, 2022: member

    ACK 0f6cd72237b5c819340e524681b5c95f6a81e0c2

  6. maflcko merged this on Nov 22, 2022
  7. maflcko closed this on Nov 22, 2022

  8. sidhujag referenced this in commit 20eb5055a2 on Nov 22, 2022
  9. mzumsande deleted the branch on Nov 22, 2022
  10. bitcoin locked this on Nov 22, 2023

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

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