Browse Source

Add DefaultCheckMemPool chain parameter

0.10
jtimon 11 years ago
parent
commit
cb9bd83bba
  1. 1
      src/chainparams.cpp
  2. 2
      src/chainparams.h
  3. 3
      src/init.cpp

1
src/chainparams.cpp

@ -250,6 +250,7 @@ public:
virtual bool RequireRPCPassword() const { return false; } virtual bool RequireRPCPassword() const { return false; }
virtual bool MiningRequiresPeers() const { return false; } virtual bool MiningRequiresPeers() const { return false; }
virtual bool MineBlocksOnDemand() const { return true; } virtual bool MineBlocksOnDemand() const { return true; }
virtual bool DefaultCheckMemPool() const { return true; }
virtual Network NetworkID() const { return CChainParams::REGTEST; } virtual Network NetworkID() const { return CChainParams::REGTEST; }
}; };
static CRegTestParams regTestParams; static CRegTestParams regTestParams;

2
src/chainparams.h

@ -63,6 +63,8 @@ public:
virtual bool RequireRPCPassword() const { return true; } virtual bool RequireRPCPassword() const { return true; }
/* Make miner wait to have peers to avoid wasting work */ /* Make miner wait to have peers to avoid wasting work */
virtual bool MiningRequiresPeers() const { return true; } virtual bool MiningRequiresPeers() const { return true; }
/* Default value for -checkmempool argument */
virtual bool DefaultCheckMemPool() const { return false; }
const string& DataDir() const { return strDataDir; } const string& DataDir() const { return strDataDir; }
/* Make miner stop after a block is found. In RPC, don't return /* Make miner stop after a block is found. In RPC, don't return
* until nGenProcLimit blocks are generated */ * until nGenProcLimit blocks are generated */

3
src/init.cpp

@ -517,7 +517,8 @@ bool AppInit2(boost::thread_group& threadGroup)
InitWarning(_("Warning: Deprecated argument -debugnet ignored, use -debug=net")); InitWarning(_("Warning: Deprecated argument -debugnet ignored, use -debug=net"));
fBenchmark = GetBoolArg("-benchmark", false); 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); Checkpoints::fEnabled = GetBoolArg("-checkpoints", true);
// -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency // -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency

Loading…
Cancel
Save