Add chain height when fetching consensus parameters in initialization

Add chain height when fetching consensus parameters in initialization,
this code was missed in the first patch as it was disabled at the time.
This commit is contained in:
Ross Nicoll 2015-07-27 15:06:24 +01:00
parent 2bb124df3f
commit 3207dbf728

View File

@ -1422,7 +1422,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
StartNode(threadGroup, scheduler);
// Monitor the chain, and alert if we get blocks much quicker or slower than expected
int64_t nPowTargetSpacing = Params().GetConsensus().nPowTargetSpacing;
int64_t nPowTargetSpacing = Params().GetConsensus(chainActive.Height()).nPowTargetSpacing;
CScheduler::Function f = boost::bind(&PartitionCheck, &IsInitialBlockDownload,
boost::ref(cs_main), boost::cref(pindexBestHeader), nPowTargetSpacing);
scheduler.scheduleEvery(f, nPowTargetSpacing);