backport 8aa722609d (IBD fix)

This commit is contained in:
UdjinM6 2016-09-27 11:52:13 +03:00
parent b8557662d3
commit 04d82025d8

View File

@ -1817,7 +1817,7 @@ bool IsInitialBlockDownload()
if (fCheckpointsEnabled && chainActive.Height() < Checkpoints::GetTotalBlocksEstimate(chainParams.Checkpoints()))
return true;
bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 ||
pindexBestHeader->GetBlockTime() < GetTime() - chainParams.MaxTipAge());
std::max(chainActive.Tip()->GetBlockTime(), pindexBestHeader->GetBlockTime()) < GetTime() - chainParams.MaxTipAge());
if (!state)
lockIBDState = true;
return state;