Page MenuHomePhabricator

Fix a race in abc_p2p_avalanche_contender_voting.py
ClosedPublic

Authored by Fabien on Wed, Apr 30, 12:42.

Details

Reviewers
PiRK
roqqit
Group Reviewers
Restricted Project
Commits
rABC91aff65ef6c2: 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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
fix_contenders_1
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 33172
Build 65827: Build Diffbuild-diff · build-clang-tidy · build-clang · build-debug · build-without-wallet
Build 65826: arc lint + arc unit