MaxTipAge should only apply on mainnet

This commit is contained in:
Brannon King 2020-02-21 16:05:33 -07:00 committed by Anthony Fieroni
parent 7fcb767c7a
commit ed26eb347f

View file

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