Bugfix: Allow mining on top of old tip blocks for testnet (fixes testnet-in-a-box use case)

This commit is contained in:
Luke Dashjr
2015-04-09 11:50:18 +00:00
parent 5fb5c9b213
commit e761d7a94f
3 changed files with 6 additions and 1 deletions

View File

@@ -1091,7 +1091,7 @@ bool IsInitialBlockDownload()
if (lockIBDState)
return false;
bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 ||
pindexBestHeader->GetBlockTime() < GetTime() - 24 * 60 * 60);
pindexBestHeader->GetBlockTime() < GetTime() - chainParams.MaxTipAge());
if (!state)
lockIBDState = true;
return state;