aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2015-06-08 16:34:58 -0400
committerGavin Andresen <gavinandresen@gmail.com>2015-06-08 16:34:58 -0400
commit65b94545036ae6e38e79e9c7166a3ba1ddb83f66 (patch)
tree52cc4ffb2c8ecb667b41cc9fbbc51badb523a6ab /src/init.cpp
parent55294a9fb673ab0a7c99b9c18279fe12a5a07890 (diff)
downloadbitcoin-65b94545036ae6e38e79e9c7166a3ba1ddb83f66.tar.xz
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
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 02dca57031..ac1b68de8b 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1396,7 +1396,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);
#ifdef ENABLE_WALLET