Page MenuHomePhabricator

Ensure Axion can be reactivated consistently in abc_mining_basic
ClosedPublic

Authored by jasonbcox on Wed, Apr 28, 18:52.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable