diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-02-04 10:16:24 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-02-04 10:23:09 +0100 |
commit | 87ecfb0f9675ef46d360014a65886e9556d28e66 (patch) | |
tree | 8c093b395637147d1d2dc31b7582041231b04e6e /src/rpcmining.cpp | |
parent | fcf646c9b08e7f846d6c99314f937ace50809d7a (diff) | |
parent | 5ebe0956b391cfa782fd97bb417d20b479df6a36 (diff) |
Merge pull request #5711
5ebe095 Trim RPC command table (Wladimir J. van der Laan)
4401b2d Removed main.h dependency from rpcserver.cpp (Eric Lombrozo)
Diffstat (limited to 'src/rpcmining.cpp')
-rw-r--r-- | src/rpcmining.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index 5df5de66d9..369b3fb4d7 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -88,6 +88,7 @@ Value getnetworkhashps(const Array& params, bool fHelp) + HelpExampleRpc("getnetworkhashps", "") ); + LOCK(cs_main); return GetNetworkHashPS(params.size() > 0 ? params[0].get_int() : 120, params.size() > 1 ? params[1].get_int() : -1); } @@ -107,6 +108,7 @@ Value getgenerate(const Array& params, bool fHelp) + HelpExampleRpc("getgenerate", "") ); + LOCK(cs_main); return GetBoolArg("-gen", false); } @@ -200,7 +202,6 @@ Value setgenerate(const Array& params, bool fHelp) return Value::null; } - #endif @@ -228,6 +229,9 @@ Value getmininginfo(const Array& params, bool fHelp) + HelpExampleRpc("getmininginfo", "") ); + + LOCK(cs_main); + Object obj; obj.push_back(Pair("blocks", (int)chainActive.Height())); obj.push_back(Pair("currentblocksize", (uint64_t)nLastBlockSize)); @@ -268,8 +272,9 @@ Value prioritisetransaction(const Array& params, bool fHelp) + HelpExampleRpc("prioritisetransaction", "\"txid\", 0.0, 10000") ); - uint256 hash = ParseHashStr(params[0].get_str(), "txid"); + LOCK(cs_main); + uint256 hash = ParseHashStr(params[0].get_str(), "txid"); CAmount nAmount = params[2].get_int64(); mempool.PrioritiseTransaction(hash, params[0].get_str(), params[1].get_real(), nAmount); @@ -358,6 +363,8 @@ Value getblocktemplate(const Array& params, bool fHelp) + HelpExampleRpc("getblocktemplate", "") ); + LOCK(cs_main); + std::string strMode = "template"; Value lpval = Value::null; if (params.size() > 0) |