Remove bad chain alert partition check

As per meeting 2016-03-31
https://bitcoincore.org/en/meetings/2016/03/31/#bad-chain-alerts

The partition checker was producing huge number of false-positives
and was disabled in 0.12.1 on the understanding it would either be
fixed in 0.13 or removed entirely from master if not.
This commit is contained in:
BtcDrak
2016-06-14 12:26:59 +01:00
committed by lateminer
parent 694c451c7e
commit 556187e3f8
5 changed files with 2 additions and 160 deletions

View File

@@ -1450,19 +1450,6 @@ bool AppInit2(Config& config, boost::thread_group& threadGroup, CScheduler& sche
InitRespendFilter();
StartNode(threadGroup, scheduler);
// Monitor the chain, and alert if we get blocks much quicker or slower than expected
// The "bad chain alert" scheduler has been disabled because the current system gives far
// too many false positives, such that users are starting to ignore them.
// This code will be disabled for 0.12.1 while a fix is deliberated in #7568
// this was discussed in the IRC meeting on 2016-03-31.
//
// --- disabled ---
//int64_t nTargetSpacing = Params().GetConsensus().nTargetSpacing;
//CScheduler::Function f = boost::bind(&PartitionCheck, &IsInitialBlockDownload,
// boost::ref(cs_main), boost::cref(pindexBestHeader), nTargetSpacing);
//scheduler.scheduleEvery(f, nTargetSpacing);
// --- end disabled ---
// Generate coins in the background
GenerateBitcoins(GetBoolArg("-gen", DEFAULT_GENERATE), GetArg("-genproclimit", DEFAULT_GENERATE_THREADS), chainparams);
#ifdef ENABLE_WALLET
@@ -1470,7 +1457,8 @@ bool AppInit2(Config& config, boost::thread_group& threadGroup, CScheduler& sche
if (!GetBoolArg("-staking", true))
LogPrintf("Staking disabled\n");
else if (pwalletMain)
threadGroup.create_thread(boost::bind(&ThreadStakeMiner, pwalletMain, chainparams));
threadGroup.create_thread(boost::bind(&ThreadStakeMiner, pwalletMain, chainparams));
// ********************************************************* Step 12: finished
#endif
SetRPCWarmupFinished();