checkpoints: move the checkpoints enable boolean into main

This pertains to app-state, so it doesn't make sense to handle inside the
checkpoint functions.
This commit is contained in:
Cory Fields
2015-04-22 23:22:36 -04:00
parent 11982d366d
commit a8cdaf5c96
6 changed files with 26 additions and 27 deletions

View File

@@ -741,7 +741,7 @@ bool AppInit2(boost::thread_group& threadGroup)
// Checkmempool and checkblockindex default to true in regtest mode
mempool.setSanityCheck(GetBoolArg("-checkmempool", chainparams.DefaultConsistencyChecks()));
fCheckBlockIndex = GetBoolArg("-checkblockindex", chainparams.DefaultConsistencyChecks());
Checkpoints::fEnabled = GetBoolArg("-checkpoints", true);
fCheckpointsEnabled = GetBoolArg("-checkpoints", true);
// -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency
nScriptCheckThreads = GetArg("-par", DEFAULT_SCRIPTCHECK_THREADS);