aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoinrpc.cpp
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2012-02-16 15:00:16 -0500
committerPieter Wuille <pieter.wuille@gmail.com>2012-02-26 23:21:33 +0100
commit972060ce0e9746c979ce0ddeeb997121414c1d58 (patch)
tree9c676a8281e62513e9ee4b5f68e01a197dc6edf2 /src/bitcoinrpc.cpp
parent4a10d4c6dcd04eb2496257754782150793ce53b1 (diff)
bitcoind changes to stop storing settings in wallet.dat.
Diffstat (limited to 'src/bitcoinrpc.cpp')
-rw-r--r--src/bitcoinrpc.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp
index c677b174ca..68cc17b518 100644
--- a/src/bitcoinrpc.cpp
+++ b/src/bitcoinrpc.cpp
@@ -301,7 +301,7 @@ Value getgenerate(const Array& params, bool fHelp)
"getgenerate\n"
"Returns true or false.");
- return (bool)fGenerateBitcoins;
+ return GetBoolArg("-gen");
}
@@ -320,13 +320,11 @@ Value setgenerate(const Array& params, bool fHelp)
if (params.size() > 1)
{
int nGenProcLimit = params[1].get_int();
- fLimitProcessors = (nGenProcLimit != -1);
- WriteSetting("fLimitProcessors", fLimitProcessors);
- if (nGenProcLimit != -1)
- WriteSetting("nLimitProcessors", nLimitProcessors = nGenProcLimit);
+ mapArgs["-genproclimit"] = itostr(nGenProcLimit);
if (nGenProcLimit == 0)
fGenerate = false;
}
+ mapArgs["-gen"] = (fGenerate ? "1" : "0");
GenerateBitcoins(fGenerate, pwalletMain);
return Value::null;
@@ -385,8 +383,8 @@ Value getmininginfo(const Array& 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("generate", (bool)fGenerateBitcoins));
- obj.push_back(Pair("genproclimit", (int)(fLimitProcessors ? nLimitProcessors : -1)));
+ 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)nPooledTx));
obj.push_back(Pair("testnet", fTestNet));