MaxTipAge should only apply on mainnet

This commit is contained in:
Brannon King 2020-02-21 16:05:33 -07:00
parent a4f8b5c358
commit a568691c10

View file

@ -1106,7 +1106,7 @@ bool IsInitialBlockDownload()
return true;
if (chainActive.Tip()->nChainWork < nMinimumChainWork)
return true;
if (chainActive.Tip()->GetBlockTime() < (GetTime() - nMaxTipAge))
if (Params().NetworkIDString() == CBaseChainParams::MAIN && chainActive.Tip()->GetBlockTime() < (GetTime() - nMaxTipAge))
return true;
LogPrintf("Leaving InitialBlockDownload (latching to false)\n");
latchToFalse.store(true, std::memory_order_relaxed);