test: fix intermittent failure in p2p_compactblocks_hb.py #29893

pull mzumsande wants to merge 1 commits into bitcoin:master from mzumsande:202404_test_compact_hb changing 1 files +9 −4
  1. mzumsande commented at 4:54 pm on April 16, 2024: contributor

    Fixes #29860

    As a result of node1 receiving a block, it sends out SENDCMPCT messages to some of its peers to update the high-bandwidth status. We need to wait until those are received and processed by the peers to avoid intermittent failures. Before, we’d only wait until all peers have synced with the new block (within generate) which is not sufficient.

    I could reproduce the failure by adding a std::this_thread::sleep_for(std::chrono::milliseconds(1000)); sleep to the net_processing code that processes NetMsgType::SENDCMPCT.

  2. test: fix intermittent failure in p2p_compactblocks_hb.py
    As a result of node1 receiving a block, it sends out
    SENDCMPCT messages to its peers to update the status.
    We need to wait until those are received and
    processed by the peers to avoid intermittent failures.
    1ae5b208d3
  3. DrahtBot commented at 4:54 pm on April 16, 2024: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK instagibbs, alfonsoromanz, glozow

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

  4. DrahtBot added the label Tests on Apr 16, 2024
  5. instagibbs approved
  6. instagibbs commented at 5:06 pm on April 16, 2024: member
    ACK 1ae5b208d339fa984d9caf4fab89b0b2ba9cc197
  7. alfonsoromanz approved
  8. alfonsoromanz commented at 5:41 pm on April 16, 2024: none
    Tested ACK 1ae5b208d339fa984d9caf4fab89b0b2ba9cc197
  9. glozow commented at 10:24 am on April 17, 2024: member

    ACK 1ae5b208d339fa984d9caf4fab89b0b2ba9cc197

    Thanks! I had this failure recently. The reason/fix makes sense to me and I tested that it works using the sleep.

  10. glozow merged this on Apr 17, 2024
  11. glozow closed this on Apr 17, 2024

  12. mzumsande deleted the branch on Apr 17, 2024

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: 2024-06-29 07:13 UTC

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