aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorGavin Andresen <[email protected]>2015-06-08 16:34:58 -0400
committerWladimir J. van der Laan <[email protected]>2015-06-15 10:34:07 +0200
commitfce474c9dfa1fd3f98f14f7c2866a6001b21ac9a (patch)
tree19ffbac3670246fabbf1292ef9f96d4cba9ad66b /src/init.cpp
parentAdd option `-alerts` to opt out of alert system (diff)
downloaddiscoin-fce474c9dfa1fd3f98f14f7c2866a6001b21ac9a.tar.xz
discoin-fce474c9dfa1fd3f98f14f7c2866a6001b21ac9a.zip
Use best header chain timestamps to detect partitioning
The partition checking code was using chainActive timestamps to detect partitioning; with headers-first syncing, it should use (and with this pull request, does use) pIndexBestHeader timestamps. Fixes issue #6251 Github-Pull: #6256 Rebased-From: 65b94545036ae6e38e79e9c7166a3ba1ddb83f66
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index eeb3358a1..3451632f1 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1420,7 +1420,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
// Monitor the chain, and alert if we get blocks much quicker or slower than expected
int64_t nPowTargetSpacing = Params().GetConsensus().nPowTargetSpacing;
CScheduler::Function f = boost::bind(&PartitionCheck, &IsInitialBlockDownload,
- boost::ref(cs_main), boost::cref(chainActive), nPowTargetSpacing);
+ boost::ref(cs_main), boost::cref(pindexBestHeader), nPowTargetSpacing);
scheduler.scheduleEvery(f, nPowTargetSpacing);
#endif
#ifdef ENABLE_WALLET