Page MenuHomePhabricator

rpc_net.py: sync blocks before mining a new block on node1
ClosedPublic

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

Details

Summary

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/test_runner.py rpc_net; done

Diff Detail

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