diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2014-10-14 23:24:51 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2014-10-14 23:24:51 +0800 |
commit | 0a069e51b3cb0430ec7bad57ffe7ad1e95c51428 (patch) | |
tree | e9c3c39a00d00e7f6bdf1631244b1e4efdf5462e | |
parent | 7a65f94db922e91d5c53035895d94355013e6068 (diff) | |
download | dexon-solidity-0a069e51b3cb0430ec7bad57ffe7ad1e95c51428.tar.gz dexon-solidity-0a069e51b3cb0430ec7bad57ffe7ad1e95c51428.tar.zst dexon-solidity-0a069e51b3cb0430ec7bad57ffe7ad1e95c51428.zip |
isMining changes to mining
-rw-r--r-- | ethstubclient.h | 48 | ||||
-rw-r--r-- | jsonrpc.cpp | 4 |
2 files changed, 26 insertions, 26 deletions
diff --git a/ethstubclient.h b/ethstubclient.h index ce9e0a9a..7cf12b61 100644 --- a/ethstubclient.h +++ b/ethstubclient.h @@ -150,30 +150,6 @@ p["s"] = s; } - bool isListening() throw (jsonrpc::JsonRpcException) - { - Json::Value p; - p = Json::nullValue; - Json::Value result = this->client->CallMethod("isListening",p); - if (result.isBool()) - return result.asBool(); - else - throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); - - } - - bool isMining() throw (jsonrpc::JsonRpcException) - { - Json::Value p; - p = Json::nullValue; - Json::Value result = this->client->CallMethod("isMining",p); - if (result.isBool()) - return result.asBool(); - else - throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); - - } - std::string key() throw (jsonrpc::JsonRpcException) { Json::Value p; @@ -198,6 +174,18 @@ p["s"] = s; } + bool listening() throw (jsonrpc::JsonRpcException) + { + Json::Value p; + p = Json::nullValue; + Json::Value result = this->client->CallMethod("listening",p); + if (result.isBool()) + return result.asBool(); + else + throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); + + } + std::string lll(const std::string& s) throw (jsonrpc::JsonRpcException) { Json::Value p; @@ -224,6 +212,18 @@ p["s"] = s; } + bool mining() throw (jsonrpc::JsonRpcException) + { + Json::Value p; + p = Json::nullValue; + Json::Value result = this->client->CallMethod("mining",p); + if (result.isBool()) + return result.asBool(); + else + throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); + + } + int number() throw (jsonrpc::JsonRpcException) { Json::Value p; diff --git a/jsonrpc.cpp b/jsonrpc.cpp index 1e262d5c..930b5686 100644 --- a/jsonrpc.cpp +++ b/jsonrpc.cpp @@ -129,11 +129,11 @@ BOOST_AUTO_TEST_CASE(jsonrpc_isMining) cnote << "Testing jsonrpc isMining..."; web3.ethereum()->startMining(); - bool miningOn = jsonrpcClient->isMining(); + bool miningOn = jsonrpcClient->mining(); BOOST_CHECK_EQUAL(miningOn, web3.ethereum()->isMining()); web3.ethereum()->stopMining(); - bool miningOff = jsonrpcClient->isMining(); + bool miningOff = jsonrpcClient->mining(); BOOST_CHECK_EQUAL(miningOff, web3.ethereum()->isMining()); } |