Page MenuHomePhabricator

Fix a race in abc_mining_basic
ClosedPublic

Authored by jasonbcox on May 17 2021, 18:25.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC1c5084bfe3aa: 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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
mining-basic-race
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15744
Build 31389: Build Diffbuild-clang-tidy · build-without-wallet · build-clang · build-diff · build-debug
Build 31388: arc lint + arc unit