Page MenuHomePhabricator

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

Authored by PiRK on Jul 21 2021, 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
Branch
rpc_net_flakiness
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 16240
Build 32347: Build Diffbuild-without-wallet · build-diff · build-clang-tidy · build-clang · build-debug
Build 32346: arc lint + arc unit