HomePhabricator

[avalanche] Don't attempt to register the same proof several times during…

Description

[avalanche] Don't attempt to register the same proof several times during orphan rescan

Summary:
This is a slight optimisation: during rescan the orphan pool will loop over each entry and try to register the proof. However the pool entries are unique per utxo, which means that a proof with several utxos will be registered several times. The peermanager will detect this and fail due to duplicated proof, but this would cause a lookup potentially in 3 pools to determine it's a duplicate.
This diff builds a set of proofs locally to prevent registering several times the same proof. There is no change of behavior.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
FabienAuthored on Jun 28 2022, 09:00
FabienPushed on Jun 30 2022, 07:47
Reviewer
Restricted Project
Differential Revision
D11676: [avalanche] Don't attempt to register the same proof several times during orphan rescan
Parents
rABCec6d12388b70: [Automated] Update timing.json
Branches
Unknown
Tags
Unknown