mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
Fix IsInitialBlockDownload to play nice with testnet
This commit is contained in:
@@ -1384,7 +1384,7 @@ bool IsInitialBlockDownload()
|
||||
if (lockIBDState)
|
||||
return false;
|
||||
bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 ||
|
||||
pindexBestHeader->GetBlockTime() < GetTime() - nMaxTipAge);
|
||||
std::max(chainActive.Tip()->GetBlockTime(), pindexBestHeader->GetBlockTime()) < GetTime() - nMaxTipAge);
|
||||
if (!state)
|
||||
lockIBDState = true;
|
||||
return state;
|
||||
|
||||
Reference in New Issue
Block a user