HomePhabricator

reset m_best_fork_tip if the fork becomes the main chain

Description

reset m_best_fork_tip if the fork becomes the main chain

Summary:
This fixes a spurious "CheckForkWarningConditions: Warning: Large fork found" log when a block is unparked resulting in m_best_fork_tip now being added back to the main chain. This warning kept being logged on every new block even though the fork was resolved.

It also adds a functional test for that log message which was previously untested.

Test Plan: ninja check check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
PiRKAuthored on May 17 2023, 08:10
PiRKPushed on May 17 2023, 13:08
Reviewer
Restricted Project
Differential Revision
D13909: reset m_best_fork_tip if the fork becomes the main chain
Parents
rABCf7270ea8a427: index, rpc: Coinstatsindex follow-ups
Branches
Unknown
Tags
Unknown