mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-08 12:19:07 +02:00
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. Github-Pull: bitcoin/bitcoin#30962 Rebased-From: c0a0c72b4d68a4f0c53c2c4b95f4d6e399f8e4ee
This commit is contained in:
parent
e24a25d882
commit
7fcd7b85c6
@ -2023,7 +2023,8 @@ void Chainstate::CheckForkWarningConditions()
|
||||
|
||||
// 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)
|
||||
if (m_chainman.IsInitialBlockDownload()) {
|
||||
// Also not applicable to the background chainstate
|
||||
if (m_chainman.IsInitialBlockDownload() || this->GetRole() == ChainstateRole::BACKGROUND) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user