Page MenuHomePhabricator

reset m_best_fork_tip if the fork becomes the main chain
ClosedPublic

Authored by PiRK on May 17 2023, 08:45.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC4459a350623b: 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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.May 17 2023, 08:45
PiRK retitled this revision from remove spurious warning about large fork if the fork tip is back on the active chain to reset m_best_fork_tip if the fork becomes the main chain.May 17 2023, 08:57
PiRK edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.May 17 2023, 12:47