validation: Disable CheckForkWarningConditions for background chainstate
The comparison of m_best_invalid with the tip of the respective chainstate makes no sense for the background chainstate, and can lead to incorrect error messages.
This commit is contained in:
1 parent
393f323bd6
commit
c0a0c72b4d
1 file changed
+2
-1
+2
-1
@@ -2020,7 +2020,8 @@ void Chainstate::CheckForkWarningConditions()
|
|||||||
|
|
||||||
// Before we get past initial download, we cannot reliably alert about forks
|
// Before we get past initial download, we cannot reliably alert about forks
|
||||||
// (we assume we don't get stuck on a fork before finishing our initial sync)
|
// (we assume we don't get stuck on a fork before finishing our initial sync)
|
||||||
if (m_chainman.IsInitialBlockDownload()) {
|
// Also not applicable to the background chainstate
|
||||||
|
if (m_chainman.IsInitialBlockDownload() || this->GetRole() == ChainstateRole::BACKGROUND) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user