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
Lint
Lint Not Applicable
Unit
Tests Not Applicable