HomePhabricator

[avalanche] Set local stake winner in the contender cache

Description

[avalanche] Set local stake winner in the contender cache

Summary:
The locally selected stake winner should be treated as accepted by default and put in the winner set. This way, the cache can flip flop on the voted status without removing the local winner until it is invalidated.

Depends on D17336

Test Plan:

ninja check check-functional

Make sure to cover the case where the selected quorum proof happens to be the local winner:

for I in {0..30}; do ./test/functional/test_runner.py abc_p2p_avalanche_contender_voting || break ; done

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
roqqitAuthored on Wed, Dec 11, 17:36
roqqitPushed on Wed, Dec 18, 22:45
Reviewer
Restricted Owners Package
Differential Revision
D17337: [avalanche] Set local stake winner in the contender cache
Parents
rABC607be5e6570a: Fix race to check chaintips in p2p_headers_sync_with_minchainwork
Branches
Unknown
Tags
Unknown