Skip to content

Commit

Permalink
Add chain height when fetching consensus parameters in initialization
Browse files Browse the repository at this point in the history
Add chain height when fetching consensus parameters in initialization,
this code was missed in the first patch as it was disabled at the time.
  • Loading branch information
Ross Nicoll committed Jul 30, 2015
1 parent 2bb124d commit 3207dbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3207dbf

Please sign in to comment.