HomePhabricator

[avalanche] Fix UB in the reward rank comparator

Description

[avalanche] Fix UB in the reward rank comparator

Summary: On the first iteration of the loop there is no selected proof yet.

Test Plan:
With ubsan:

ninja check-avalanche

Reviewers: #bitcoin_abc, roqqit

Reviewed By: #bitcoin_abc, roqqit

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

Details

Provenance
FabienAuthored on Jan 8 2025, 21:13
teamcityPushed on Jan 8 2025, 21:49
Parents
rSTAGING11d2e76dd3c3: [avalanche] Refactor reward ranking logic into its own comparator
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/52075, tag: phabricator/base/52058, tag: phabricator/base/52056

Event Timeline