Page MenuHomePhabricator

[herald] Fix parsing of the staking reward winner
ClosedPublic

Authored by Fabien on Oct 7 2024, 08:39.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC4a1e75ee7025: [herald] Fix parsing of the staking reward winner
Summary

The parsing function returns the staker address. It's very possible that there is no address for the winner, so avoid crashing the app if this happens.
This diff lets the parsing return the script hex instead, and the callsite attempt to convert it to address so it will make no difference with the current network state.

Test Plan
npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
master
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30505
Build 60527: Build Diffecash-herald-tests
Build 60526: arc lint + arc unit