HomePhabricator

Fix a race in abc_mining_basic

Description

Fix a race in abc_mining_basic

Summary:
I noted in D9453 that approach was simpler, but it turns out there is
still a race in that approach. Running each set of tests where nodes are connected
in a hub-and-spoke is more robust, since it's possible for interconnected nodes
to sync blocks at inconvenient times and trigger a reorg. This wasn't caught earlier
because the test happens to complete relatively quickly and the nodes tend to not
sync blocks on their own before the entire test completes.

This approach has slightly more overhead (1 more node), but otherwise functionally
the same as before.

Test Plan:

for i in {1..100}; do ./test/functional/test_runner.py abc_mining* ; done

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D9541

Details

Provenance
jasonbcoxAuthored on May 17 2021, 18:17
jasonbcoxPushed on May 18 2021, 17:47
Reviewer
Restricted Project
Differential Revision
D9541: Fix a race in abc_mining_basic
Parents
rABC6f09bb224dc6: Use mockable time everywhere in net_processing
Branches
Unknown
Tags
Unknown