IsInitialBlockDownload no longer uses header-only timestamps.

This commit is contained in:
Gregory Maxwell
2016-11-01 00:37:54 +00:00
committed by lateminer
parent c7f6a2e815
commit c0c8c006aa

View File

@@ -1710,11 +1710,10 @@ bool IsInitialBlockDownload()
return true;
if (chainActive.Tip()->nChainWork < UintToArith256(chainParams.GetConsensus().nMinimumChainWork))
return true;
bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 ||
pindexBestHeader->GetBlockTime() < GetTime() - nMaxTipAge);
if (!state)
latchToFalse.store(true, std::memory_order_relaxed);
return state;
if (chainActive.Tip()->GetBlockTime() < (GetTime() - nMaxTipAge))
return true;
latchToFalse.store(true, std::memory_order_relaxed);
return false;
}
bool fLargeWorkForkFound = false;