diff options
author | winsvega <winsvega@mail.ru> | 2015-02-10 18:19:27 +0800 |
---|---|---|
committer | winsvega <winsvega@mail.ru> | 2015-02-10 18:19:27 +0800 |
commit | 30db15c1a9933972f0ad0236e50bc967ebf24dd3 (patch) | |
tree | 3ca08f951f2dee908dce70271c984d32c30d0adc /webthreestubclient.h | |
parent | c09b7885e88b842a024e6b8a2e6cf5fd5d845ab3 (diff) | |
parent | 8f9511c6ec3a7df05188e9aa6322b5ec0932c095 (diff) | |
download | dexon-solidity-30db15c1a9933972f0ad0236e50bc967ebf24dd3.tar dexon-solidity-30db15c1a9933972f0ad0236e50bc967ebf24dd3.tar.gz dexon-solidity-30db15c1a9933972f0ad0236e50bc967ebf24dd3.tar.bz2 dexon-solidity-30db15c1a9933972f0ad0236e50bc967ebf24dd3.tar.lz dexon-solidity-30db15c1a9933972f0ad0236e50bc967ebf24dd3.tar.xz dexon-solidity-30db15c1a9933972f0ad0236e50bc967ebf24dd3.tar.zst dexon-solidity-30db15c1a9933972f0ad0236e50bc967ebf24dd3.zip |
Merge branch 'develop' of https://github.com/ethereum/cpp-ethereum into develop
Diffstat (limited to 'webthreestubclient.h')
-rw-r--r-- | webthreestubclient.h | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/webthreestubclient.h b/webthreestubclient.h index 6a82263d..1836f650 100644 --- a/webthreestubclient.h +++ b/webthreestubclient.h @@ -213,6 +213,16 @@ class WebThreeStubClient : public jsonrpc::Client else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); } + bool eth_flush() throw (jsonrpc::JsonRpcException) + { + Json::Value p; + p = Json::nullValue; + Json::Value result = this->CallMethod("eth_flush",p); + if (result.isBool()) + return result.asBool(); + else + throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); + } Json::Value eth_blockByHash(const std::string& param1) throw (jsonrpc::JsonRpcException) { Json::Value p; @@ -347,13 +357,13 @@ class WebThreeStubClient : public jsonrpc::Client else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); } - bool eth_changed(const int& param1) throw (jsonrpc::JsonRpcException) + Json::Value eth_changed(const int& param1) throw (jsonrpc::JsonRpcException) { Json::Value p; p.append(param1); Json::Value result = this->CallMethod("eth_changed",p); - if (result.isBool()) - return result.asBool(); + if (result.isArray()) + return result; else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); } @@ -377,6 +387,26 @@ class WebThreeStubClient : public jsonrpc::Client else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); } + Json::Value eth_getWork() throw (jsonrpc::JsonRpcException) + { + Json::Value p; + p = Json::nullValue; + Json::Value result = this->CallMethod("eth_getWork",p); + if (result.isArray()) + return result; + else + throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); + } + bool eth_submitWork(const std::string& param1) throw (jsonrpc::JsonRpcException) + { + Json::Value p; + p.append(param1); + Json::Value result = this->CallMethod("eth_submitWork",p); + if (result.isBool()) + return result.asBool(); + else + throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); + } bool db_put(const std::string& param1, const std::string& param2, const std::string& param3) throw (jsonrpc::JsonRpcException) { Json::Value p; |