aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2016-04-28 12:55:30 +0200
committerWladimir J. van der Laan <[email protected]>2016-04-28 12:55:35 +0200
commitd9594bfe0c3e8818f5490979c3d94d752383352e (patch)
tree953c70b01b4497086bf043aa48d16111c23ccf23 /src/main.cpp
parentMerge #7939: qt: Make it possible to show details for multiple transactions (diff)
parentFix IsInitialBlockDownload to play nice with testnet (diff)
downloaddiscoin-d9594bfe0c3e8818f5490979c3d94d752383352e.tar.xz
discoin-d9594bfe0c3e8818f5490979c3d94d752383352e.zip
Merge #7514: Fix IsInitialBlockDownload for testnet
8aa7226 Fix IsInitialBlockDownload to play nice with testnet (jmacwhyte)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index f6a89fa2e..87f15737f 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;