diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-04-28 12:55:30 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-04-28 12:55:35 +0200 |
commit | d9594bfe0c3e8818f5490979c3d94d752383352e (patch) | |
tree | 953c70b01b4497086bf043aa48d16111c23ccf23 | |
parent | 574ddc63d6ff6403560607cce57bbf049cb9d4f2 (diff) | |
parent | 8aa722609d7e736b3a3763e15b552795b94f0e9b (diff) |
Merge #7514: Fix IsInitialBlockDownload for testnet
8aa7226 Fix IsInitialBlockDownload to play nice with testnet (jmacwhyte)
-rw-r--r-- | src/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index f6a89fa2e6..87f15737f3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1583,7 +1583,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; |