HomePhabricator

[avalanche] Refactor reward ranking logic into its own comparator

Description

[avalanche] Refactor reward ranking logic into its own comparator

Summary:
Sharing the reward ranking logic between the contender cache and peer manager makes it easier to reason about. This also cleans up the if statement in selectStakingRewardWinner that is difficult to read at a glance.

There is no change in behavior.

Test Plan:

ninja check check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
roqqitAuthored on Wed, Jan 8, 17:31
roqqitPushed on Wed, Jan 8, 20:37
Reviewer
Restricted Project
Differential Revision
D17495: [avalanche] Refactor reward ranking logic into its own comparator
Parents
rABCaf0b36e7a75e: [chronik] Fix flakiness in chronik_script_history
Branches
Unknown
Tags
Unknown