Page MenuHomePhabricator sync blocks before mining a new block on node1

Authored by PiRK on Wed, Jul 21, 08:38.



node0 generates 101 blocks, then the nodes are connected, and then the
tests were started without waiting for the synchronization. So the block
mined by node1 in test_getpeerinfo was sometimes based on an outdated
block, which caused it to be orphaned.

Since D9819, the coinbase UTXO in that block is used as an avalanche
stake. When the block was orphaned, the avalanche proof became invalid,
causing intermittent failures.

This is solved by synchronizing the nodes before starting the tests.

This happens to be an unintentional backport of core#20214

Test Plan

for i in {1..100}; do test/functional/ rpc_net; done

Diff Detail

rABC Bitcoin ABC
Lint Not Applicable
Tests Not Applicable