Page MenuHomePhabricator

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

Authored by Fabien on Jun 28 2022, 14:37.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avalanche_rescan_single_proof
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 19495
Build 38720: Build Difflint-circular-dependencies · build-debug · build-diff · build-without-wallet · build-clang-tidy · build-clang
Build 38719: arc lint + arc unit