HomePhabricator

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

Description

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

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

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

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

Details

Provenance
PiRKAuthored on Jul 21 2021, 08:29
PiRKPushed on Jul 21 2021, 12:09
Reviewer
Restricted Project
Differential Revision
D9827: rpc_net.py: sync blocks before mining a new block on node1
Parents
rABCe551bfacbff7: validation: Remove review-only comments + assertions
Branches
Unknown
Tags
Unknown