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
Lint
Lint Not Applicable
Unit
Tests Not Applicable