Skip to content

Commit da612ce

Browse files
committed
Merge bitcoin/bitcoin#30962: validation: Disable CheckForkWarningConditions for background chainstate
c0a0c72 validation: Disable CheckForkWarningConditions for background chainstate (Martin Zumsande) Pull request description: The comparison of `m_best_invalid` with the tip of the chainstate makes no sense for the background chainstate and can lead to incorrect log messages. Fixes #30958 ACKs for top commit: fjahr: utACK c0a0c72 achow101: ACK c0a0c72 TheCharlatan: ACK c0a0c72 tdb3: CR ACK c0a0c72 Tree-SHA512: 316811b1ade8521681f3a105c7db59dfdb27b1e13efeba95cd6183d750db2e07f48968e8fc54fe3834d3311519cf8c6b77d7e0fd61facbf2b07598e79110ff85
2 parents 39219fe + c0a0c72 commit da612ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/validation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2020,7 +2020,8 @@ void Chainstate::CheckForkWarningConditions()
20202020

20212021
// Before we get past initial download, we cannot reliably alert about forks
20222022
// (we assume we don't get stuck on a fork before finishing our initial sync)
2023-
if (m_chainman.IsInitialBlockDownload()) {
2023+
// Also not applicable to the background chainstate
2024+
if (m_chainman.IsInitialBlockDownload() || this->GetRole() == ChainstateRole::BACKGROUND) {
20242025
return;
20252026
}
20262027

0 commit comments

Comments
 (0)