diff options
author | Gav Wood <i@gavwood.com> | 2015-04-11 06:45:21 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2015-04-11 06:45:21 +0800 |
commit | b848fa9af1487c3cfcc35d4ff24a6c48b0c79d06 (patch) | |
tree | 4fb8760fe2e2aa182a12391d2e29d5b2db108907 /webthreestubclient.h | |
parent | c111dbff3f4d4d5e6d064b38bcd645f2d763ccab (diff) | |
download | dexon-solidity-b848fa9af1487c3cfcc35d4ff24a6c48b0c79d06.tar dexon-solidity-b848fa9af1487c3cfcc35d4ff24a6c48b0c79d06.tar.gz dexon-solidity-b848fa9af1487c3cfcc35d4ff24a6c48b0c79d06.tar.bz2 dexon-solidity-b848fa9af1487c3cfcc35d4ff24a6c48b0c79d06.tar.lz dexon-solidity-b848fa9af1487c3cfcc35d4ff24a6c48b0c79d06.tar.xz dexon-solidity-b848fa9af1487c3cfcc35d4ff24a6c48b0c79d06.tar.zst dexon-solidity-b848fa9af1487c3cfcc35d4ff24a6c48b0c79d06.zip |
Ability to switch GPU/CPU mining on the fly.
Diffstat (limited to 'webthreestubclient.h')
-rw-r--r-- | webthreestubclient.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/webthreestubclient.h b/webthreestubclient.h index a460ddda..c1fdc341 100644 --- a/webthreestubclient.h +++ b/webthreestubclient.h @@ -72,6 +72,16 @@ class WebThreeStubClient : public jsonrpc::Client else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); } + std::string eth_hashrate() throw (jsonrpc::JsonRpcException) + { + Json::Value p; + p = Json::nullValue; + Json::Value result = this->CallMethod("eth_hashrate",p); + if (result.isString()) + return result.asString(); + else + throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); + } std::string eth_coinbase() throw (jsonrpc::JsonRpcException) { Json::Value p; |