diff options
author | Jeff Garzik <jgarzik@bitpay.com> | 2013-10-01 07:09:04 -0700 |
---|---|---|
committer | Jeff Garzik <jgarzik@bitpay.com> | 2013-10-01 07:09:04 -0700 |
commit | 19c415b1cf0dc4fd5fe08e8e7e146c7996261170 (patch) | |
tree | 13a6ee3c9b96736b3c767985714780d92df694d5 /src/bitcoinrpc.cpp | |
parent | 95a766abc5ae210cb6f35387dedaeab7475e4a92 (diff) | |
parent | d64eef48a45d1bbbbab5adf39d6ba1fe4537cea1 (diff) |
Merge pull request #2888 from litecoin-project/getnetworkhashps
Add getnetworkhashps to get the estimated network hashrate
Diffstat (limited to 'src/bitcoinrpc.cpp')
-rw-r--r-- | src/bitcoinrpc.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index ce8ff71a26..3ec47f89e6 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -229,6 +229,7 @@ static const CRPCCommand vRPCCommands[] = { "addnode", &addnode, true, true }, { "getaddednodeinfo", &getaddednodeinfo, true, true }, { "getdifficulty", &getdifficulty, true, false }, + { "getnetworkhashps", &getnetworkhashps, true, false }, { "getgenerate", &getgenerate, true, false }, { "setgenerate", &setgenerate, true, false }, { "gethashespersec", &gethashespersec, true, false }, @@ -1188,6 +1189,8 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector<std::stri if (strMethod == "getaddednodeinfo" && n > 0) ConvertTo<bool>(params[0]); if (strMethod == "setgenerate" && n > 0) ConvertTo<bool>(params[0]); if (strMethod == "setgenerate" && n > 1) ConvertTo<boost::int64_t>(params[1]); + if (strMethod == "getnetworkhashps" && n > 0) ConvertTo<boost::int64_t>(params[0]); + if (strMethod == "getnetworkhashps" && n > 1) ConvertTo<boost::int64_t>(params[1]); if (strMethod == "sendtoaddress" && n > 1) ConvertTo<double>(params[1]); if (strMethod == "settxfee" && n > 0) ConvertTo<double>(params[0]); if (strMethod == "getreceivedbyaddress" && n > 1) ConvertTo<boost::int64_t>(params[1]); |