aboutsummaryrefslogtreecommitdiff
path: root/src/rpcmining.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2013-04-28 17:37:50 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2013-06-01 12:53:57 +0200
commit3260b4c09006ea5c1b00c599a14e6c706ac760f8 (patch)
treef413a27870dbbf73933c73c58823e377a5c4b22f /src/rpcmining.cpp
parent3d661110dae5fe62585ab753ef996f081a11855d (diff)
remove GetBoolArg() fDefault parameter defaulting to false
- explicitly set the default of all GetBoolArg() calls - rework getarg_test.cpp and util_tests.cpp to cover this change - some indentation fixes - move macdockiconhandler.h include in bitcoin.cpp to the "our headers" section
Diffstat (limited to 'src/rpcmining.cpp')
-rw-r--r--src/rpcmining.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 845e7f1f9c..d2cac68706 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -33,7 +33,7 @@ Value getgenerate(const Array& params, bool fHelp)
"getgenerate\n"
"Returns true or false.");
- return GetBoolArg("-gen");
+ return GetBoolArg("-gen", false);
}
@@ -84,16 +84,16 @@ Value getmininginfo(const Array& params, bool fHelp)
"Returns an object containing mining-related information.");
Object obj;
- obj.push_back(Pair("blocks", (int)nBestHeight));
- obj.push_back(Pair("currentblocksize",(uint64_t)nLastBlockSize));
- 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("generate", GetBoolArg("-gen")));
- obj.push_back(Pair("genproclimit", (int)GetArg("-genproclimit", -1)));
- obj.push_back(Pair("hashespersec", gethashespersec(params, false)));
- obj.push_back(Pair("pooledtx", (uint64_t)mempool.size()));
- obj.push_back(Pair("testnet", fTestNet));
+ obj.push_back(Pair("blocks", (int)nBestHeight));
+ obj.push_back(Pair("currentblocksize", (uint64_t)nLastBlockSize));
+ 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("generate", GetBoolArg("-gen", false)));
+ obj.push_back(Pair("genproclimit", (int)GetArg("-genproclimit", -1)));
+ obj.push_back(Pair("hashespersec", gethashespersec(params, false)));
+ obj.push_back(Pair("pooledtx", (uint64_t)mempool.size()));
+ obj.push_back(Pair("testnet", fTestNet));
return obj;
}