HomePhabricator

[avalanche] Do not add the same payout script more than once when calling…

Description

[avalanche] Do not add the same payout script more than once when calling setstakingreward RPC

Summary:
Calling setstakingreward with the same inputs will continue to append to the list,
which is unexpected.

The impact of fixing this alone is relatively low but sets the stage for refactoring and using
this code in other places, such as pre-consensus on staking rewards.

Test Plan:

ninja
./test/functional/test_runner.py abc_mining_stakingrewards

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
roqqitAuthored on Jul 29 2024, 16:57
roqqitPushed on Jul 30 2024, 16:14
Reviewer
Restricted Owners Package
Differential Revision
D16545: [avalanche] Do not add the same payout script more than once when calling setstakingreward RPC
Parents
rABCa82dbcbacd63: [test_framework] Move sighash related functions to signature_hash.py
Branches
Unknown
Tags
Unknown