IBD check uses minimumchain work instead of checkpoints.
This commit is contained in:
committed by
lateminer
parent
75402d67c1
commit
1bf644c43f
@@ -1698,7 +1698,9 @@ bool IsInitialBlockDownload()
|
||||
LOCK(cs_main);
|
||||
if (fImporting || fReindex)
|
||||
return true;
|
||||
if (fCheckpointsEnabled && chainActive.Height() < Checkpoints::GetTotalBlocksEstimate(chainParams.Checkpoints()))
|
||||
if (chainActive.Tip() == NULL)
|
||||
return true;
|
||||
if (chainActive.Tip()->nChainWork < UintToArith256(chainParams.GetConsensus().nMinimumChainWork))
|
||||
return true;
|
||||
static bool lockIBDState = false;
|
||||
if (lockIBDState)
|
||||
@@ -1738,7 +1740,7 @@ void CheckForkWarningConditions()
|
||||
{
|
||||
AssertLockHeld(cs_main);
|
||||
// Before we get past initial download, we cannot reliably alert about forks
|
||||
// (we assume we don't get stuck on a fork before the last checkpoint)
|
||||
// (we assume we don't get stuck on a fork before finishing our initial sync)
|
||||
if (IsInitialBlockDownload())
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user