HomePhabricator

[avalanche] Fix the local proof status when it is already registered

Description

[avalanche] Fix the local proof status when it is already registered

Summary:
The local proof registration status is updated at each block, which
means that once the proof is known it triggers an already registered
error for each subsequent block (unless it turns invalid).
This is the intended registration behavior, but that's weird from the
status point of view. This leads to confusing states in the
getavalancheinfo output where e.g. an immature proof will show as
duplicated after the first block.

This diff fixes this by maintaining a proper registration status when
the proof is marked as duplicated.

Depends on D14581.

Test Plan:

ninja all check-all

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
FabienAuthored on Oct 3 2023, 08:40
FabienPushed on Oct 3 2023, 10:58
Reviewer
Restricted Project
Differential Revision
D14582: [avalanche] Fix the local proof status when it is already registered
Parents
rABCe35ec229a99d: [avalanche] Move the processor updatedBlockTip logic to a private method
Branches
Unknown
Tags
Unknown