[avalanche] Down-rank rejected contenders
Summary:
Since D17710, we no longer remove invalidated contenders from the winner set. However, if other contenders finalized, we do not want to select the invalidated winner as the preferred stake winner for mining even if it has the highest rank. This patch down-ranks rejected contenders so that they do not occupy the preferred slot.
Depends on D17700
Test Plan:
ninja check for I in {0..10}; do ./test/functional/test_runner.py abc_p2p_avalanche_contender_voting || break ; done
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D17728