From 8aa722609d7e736b3a3763e15b552795b94f0e9b Mon Sep 17 00:00:00 2001 From: jmacwhyte Date: Thu, 11 Feb 2016 18:02:46 -0800 Subject: [PATCH] Fix IsInitialBlockDownload to play nice with testnet --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 3ad2979b6..9e478b682 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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;