Fix the avalanche tests
Summary:
On slow runs (slow machine, debug, sanitizers, ...) the fork_node has
not enough time to sync the blocks:
- After the initial 100 blocks creation, the node will invalidate
blocks starting at height 76, generate a new chain then reconsider. If
the fork_node has not synced to the 100th block before the
invalidation, it will not have enough pow to get the avapoll message to
be sent at the end of the test. When the fork_node invalidates the
block 100, it should select this previous 100th block as the new tip.
Not doing so will make the fork_node last generated block reach height
101 instead of 102, and not have enough work to make it a new tip
candidate hence the poll message not sent.
- The second sync is just to give some time for the fork_node to
catch up, avoiding the assertion to fail spuriously.
Depends on D5693 for the test plan to succeed.
Test Plan:
ninja for i in {1..100}; do if ! ./test/functional/test_runner.py abc-p2p-avalanche then break fi done
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D5694