Page MenuHomePhabricator

[herald] Fix a bug in the staked amount when there are multiple proofs for the same payout
ClosedPublic

Authored by Fabien on Oct 14 2025, 08:25.

Details

Summary

We have the case of a staker splitting the coins into several proofs and using the same payout address, making it impossible to differentiate. This makes the staked amount wrong as the code currently stops on first payout match, as well as the expected gain.
Fix this by summing all the identical payout addresses accross stakers. The test data is massaged to cover the change.

Test Plan
npm run test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
herald_staker_amount_bug
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 34777
Build 69016: Build Diffecash-herald-tests
Build 69015: arc lint + arc unit