HomePhabricator

[avalanche] Add helper function Proof::amountToScore().

Description

[avalanche] Add helper function Proof::amountToScore().

Summary:
There are multiple places we want to convert an Amount of stake into a proof score, so pull that
logic into it's own helper function. Score computation logic in tested in the Avalanche unit tests,
which covers this behavior.

Test Plan:

ninja check-avalanche

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
tyler-smithAuthored on Mar 5 2022, 05:23
tyler-smithPushed on Mar 16 2022, 09:21
Reviewer
Restricted Project
Differential Revision
D11179: [avalanche] Add helper function Proof::amountToScore().
Parents
rABC09391f432433: validation: Pass in blockman to ContextualCheckBlockHeader
Branches
Unknown
Tags
Unknown