aboutsummaryrefslogtreecommitdiff
path: root/src/rpcmining.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2015-06-27 23:48:38 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2015-10-01 23:16:42 +0000
commit5f9260f45843e5b0e1f4156af0f7b6d6c2d93a76 (patch)
tree786c434f05ee26a808a7a79783c0c79c6c753ab9 /src/rpcmining.cpp
parent420a82f1ae2f56938ea935fbdbb60e47685684c7 (diff)
Bugfix: If genproclimit is omitted to RPC setgenerate, don't change it; also show correct default in getmininginfo
Diffstat (limited to 'src/rpcmining.cpp')
-rw-r--r--src/rpcmining.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index c49c3e5194..f42b31627c 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -211,7 +211,7 @@ UniValue setgenerate(const UniValue& params, bool fHelp)
if (params.size() > 0)
fGenerate = params[0].get_bool();
- int nGenProcLimit = -1;
+ int nGenProcLimit = GetArg("-genproclimit", DEFAULT_GENERATE_THREADS);
if (params.size() > 1)
{
nGenProcLimit = params[1].get_int();
@@ -259,7 +259,7 @@ UniValue getmininginfo(const UniValue& params, bool fHelp)
obj.push_back(Pair("currentblocktx", (uint64_t)nLastBlockTx));
obj.push_back(Pair("difficulty", (double)GetDifficulty()));
obj.push_back(Pair("errors", GetWarnings("statusbar")));
- obj.push_back(Pair("genproclimit", (int)GetArg("-genproclimit", -1)));
+ obj.push_back(Pair("genproclimit", (int)GetArg("-genproclimit", DEFAULT_GENERATE_THREADS)));
obj.push_back(Pair("networkhashps", getnetworkhashps(params, false)));
obj.push_back(Pair("pooledtx", (uint64_t)mempool.size()));
obj.push_back(Pair("testnet", Params().TestnetToBeDeprecatedFieldRPC()));