HomePhabricator

Fix a race in abc_p2p_avalanche_contender_voting.py

Description

Fix a race in abc_p2p_avalanche_contender_voting.py

Summary:
The find_polled_contenders() asserts that all contenders are polled when at least one is. This is fundamentally false because the contenders are added to the poll one by one, so it's possible for the avalanche processor to run the event loop while not all have been added yet and only a subset of the contenders are polled. This should not last more than a handful even loops which run every 100ms so we can just wait instead of asserting.

Depends on D18022.

Test Plan:

./test/functional/test_runner.py abc_p2p_avalanche_contender_voting

The test might be failing for other reasons

Reviewers: #bitcoin_abc, PiRK, roqqit

Reviewed By: #bitcoin_abc, PiRK, roqqit

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

Details

Provenance
FabienAuthored on Wed, Apr 30, 08:51
FabienPushed on Wed, Apr 30, 19:02
Reviewer
Restricted Project
Differential Revision
D18027: Fix a race in abc_p2p_avalanche_contender_voting.py
Parents
rABCec2d6641c8af: test: p2p: remove tests for header messages that are oversized due to the…
Branches
Unknown
Tags
Unknown