HomePhabricator

[avalanche] make delegateavalancheproof take a limited id rather than a whole…

Description

[avalanche] make delegateavalancheproof take a limited id rather than a whole proof

Summary:
The DelegationBuilder does not need a complete proof to build a delegation, only its master public key and its limited proof id. Add a constructor that does not require the proof.
Remove also the proofid member that can be computed from the limited ID.

Replace the DelegationBuilder::importDelegation method with a DelegationBuilder(const Delegation &dg) constructor.

Use these 2 new constructors in the delegateavalancheproof RPC.

Use a private constructor to factor the common code for the 3 public constructors.

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, deadalnix, Fabien

Reviewed By: #bitcoin_abc, deadalnix, Fabien

Subscribers: Fabien, deadalnix

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

Details

Provenance
PiRKAuthored on May 31 2021, 15:12
PiRKPushed on Jun 4 2021, 15:57
Reviewer
Restricted Project
Differential Revision
D9613: [avalanche] make delegateavalancheproof take a limited id rather than a whole proof
Parents
rABCc565a795866a: [avalanche] use the OrphanProofPool
Branches
Unknown
Tags
Unknown