HomePhabricator

Ensure Axion can be reactivated consistently in abc_mining_basic

Description

Ensure Axion can be reactivated consistently in abc_mining_basic

Summary:
abc_mining_basic runs the same tests on two different nodes.
Since the tests expect to activate Axion, a race condition exists where
node1 may sync some of node0's blocks before the tests complete for node1,
resulting in an unexpected Axion activation.

Normally, we could override setup_network() to ensure the nodes do not talk
to each other. However, since getblocktemplate expects a peer, it's easier to
leave them connected and simply invalidate any blocks mined by the other node to
ensure a clean Axion activation.

Test Plan:
Run the test multiple times and observe the race no longer occurs:

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

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
jasonbcoxAuthored on Apr 28 2021, 18:24
jasonbcoxPushed on Apr 29 2021, 16:55
Reviewer
Restricted Project
Differential Revision
D9453: Ensure Axion can be reactivated consistently in abc_mining_basic
Parents
rABC93d59c134415: [Cashtab] bug fix in utxo diff check
Branches
Unknown
Tags
Unknown