Merge #7780: [0.12] Disable bad-chain alert

8692626 Disable bad chain alerts (BtcDrak)
This commit is contained in:
Wladimir J. van der Laan 2016-04-01 14:16:29 +02:00
commit c5f94f6584
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6

View File

@ -1645,10 +1645,17 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
StartNode(threadGroup, scheduler); StartNode(threadGroup, scheduler);
// Monitor the chain, and alert if we get blocks much quicker or slower than expected // Monitor the chain, and alert if we get blocks much quicker or slower than expected
int64_t nPowTargetSpacing = Params().GetConsensus().nPowTargetSpacing; // The "bad chain alert" scheduler has been disabled because the current system gives far
CScheduler::Function f = boost::bind(&PartitionCheck, &IsInitialBlockDownload, // too many false positives, such that users are starting to ignore them.
boost::ref(cs_main), boost::cref(pindexBestHeader), nPowTargetSpacing); // This code will be disabled for 0.12.1 while a fix is deliberated in #7568
scheduler.scheduleEvery(f, nPowTargetSpacing); // this was discussed in the IRC meeting on 2016-03-31.
//
// --- disabled ---
//int64_t nPowTargetSpacing = Params().GetConsensus().nPowTargetSpacing;
//CScheduler::Function f = boost::bind(&PartitionCheck, &IsInitialBlockDownload,
// boost::ref(cs_main), boost::cref(pindexBestHeader), nPowTargetSpacing);
//scheduler.scheduleEvery(f, nPowTargetSpacing);
// --- end disabled ---
// Generate coins in the background // Generate coins in the background
GenerateBitcoins(GetBoolArg("-gen", DEFAULT_GENERATE), GetArg("-genproclimit", DEFAULT_GENERATE_THREADS), chainparams); GenerateBitcoins(GetBoolArg("-gen", DEFAULT_GENERATE), GetArg("-genproclimit", DEFAULT_GENERATE_THREADS), chainparams);