test: fix intermittent failure in wallet_reorgrestore.py #29425

pull mzumsande wants to merge 1 commits into bitcoin:master from mzumsande:202402_fix_wallet_reorgrestore changing 1 files +1 −0
  1. mzumsande commented at 8:45 pm on February 12, 2024: contributor

    By adding a missing sync_blocks call. There was a race at node2 between connecting the block produced by node0, and using -generate to create new blocks itself. In the failed run, block generation started before connecting the block, resulting in a final block height that was smaller by 1 than expected. See #29392 (comment) for a more detailed analysis of the failed run.

    Can be reproduced by adding a sleep to this spot in ChainstateManager::ProcessNewBlock():

    0if (util::ThreadGetInternalName() == "msghand") {
    1    std::this_thread::sleep_for(0.2s);
    2}
    

    which fails for me on master and succeeds with the fix.

    Fixes #29392

  2. test: fix intermittent failure in wallet_reorgrestore.py
    ...by adding a missing sync_blocks call.
    There was a race at node2 between connecting the block
    produced by node 0, and using -generate to create new blocks
    itself. In the failed run, the latter happened first,
    resulting in a final block height that was smaller by 1 than
    expected.
    44d11532f8
  3. DrahtBot commented at 8:45 pm on February 12, 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 maflcko

    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 Feb 12, 2024
  5. maflcko commented at 8:59 am on February 13, 2024: member

    Thanks!

    lgtm ACK 44d11532f80705b790bc6e28df9a96ac54b25f9b

  6. maflcko added this to the milestone 27.0 on Feb 13, 2024
  7. fanquake merged this on Feb 13, 2024
  8. fanquake closed this on Feb 13, 2024

  9. mzumsande deleted the branch on Feb 29, 2024


mzumsande DrahtBot maflcko

Labels
Tests

Milestone
27.0


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-09-29 01:12 UTC

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