aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/chainparams.cpp1
-rw-r--r--src/chainparams.h2
-rw-r--r--src/init.cpp3
3 files changed, 5 insertions, 1 deletions
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 64723978bb..75a14c6013 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -250,6 +250,7 @@ public:
virtual bool RequireRPCPassword() const { return false; }
virtual bool MiningRequiresPeers() const { return false; }
virtual bool MineBlocksOnDemand() const { return true; }
+ virtual bool DefaultCheckMemPool() const { return true; }
virtual Network NetworkID() const { return CChainParams::REGTEST; }
};
static CRegTestParams regTestParams;
diff --git a/src/chainparams.h b/src/chainparams.h
index f331d956fe..bc982ee040 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -63,6 +63,8 @@ public:
virtual bool RequireRPCPassword() const { return true; }
/* Make miner wait to have peers to avoid wasting work */
virtual bool MiningRequiresPeers() const { return true; }
+ /* Default value for -checkmempool argument */
+ virtual bool DefaultCheckMemPool() const { return false; }
const string& DataDir() const { return strDataDir; }
/* Make miner stop after a block is found. In RPC, don't return
* until nGenProcLimit blocks are generated */
diff --git a/src/init.cpp b/src/init.cpp
index 840a07d610..a225c3f964 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -517,7 +517,8 @@ bool AppInit2(boost::thread_group& threadGroup)
InitWarning(_("Warning: Deprecated argument -debugnet ignored, use -debug=net"));
fBenchmark = GetBoolArg("-benchmark", false);
- mempool.setSanityCheck(GetBoolArg("-checkmempool", RegTest()));
+ // Checkmempool defaults to true in regtest mode
+ mempool.setSanityCheck(GetBoolArg("-checkmempool", Params().DefaultCheckMemPool()));
Checkpoints::fEnabled = GetBoolArg("-checkpoints", true);
// -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency