aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2014-10-15 03:53:11 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2014-10-15 03:53:11 +0800
commitf9635e72aa6e16aa8dabf61c619901b65321e2a5 (patch)
treef8932014b0a5437ba6a6680b1cb584c6b4533bd1
parent0a069e51b3cb0430ec7bad57ffe7ad1e95c51428 (diff)
downloaddexon-solidity-f9635e72aa6e16aa8dabf61c619901b65321e2a5.tar.gz
dexon-solidity-f9635e72aa6e16aa8dabf61c619901b65321e2a5.tar.zst
dexon-solidity-f9635e72aa6e16aa8dabf61c619901b65321e2a5.zip
setCoinbase method
-rw-r--r--ethstubclient.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/ethstubclient.h b/ethstubclient.h
index 7cf12b61..0ccdce05 100644
--- a/ethstubclient.h
+++ b/ethstubclient.h
@@ -261,27 +261,40 @@ p["s"] = s;
}
- Json::Value setListening(const bool& l) throw (jsonrpc::JsonRpcException)
+ bool setCoinbase(const std::string& address) throw (jsonrpc::JsonRpcException)
+ {
+ Json::Value p;
+ p["address"] = address;
+
+ Json::Value result = this->client->CallMethod("setCoinbase",p);
+ if (result.isBool())
+ return result.asBool();
+ else
+ throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
+
+ }
+
+ bool setListening(const bool& l) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p["l"] = l;
Json::Value result = this->client->CallMethod("setListening",p);
- if (result.isArray())
- return result;
+ if (result.isBool())
+ return result.asBool();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
}
- Json::Value setMining(const bool& l) throw (jsonrpc::JsonRpcException)
+ bool setMining(const bool& l) throw (jsonrpc::JsonRpcException)
{
Json::Value p;
p["l"] = l;
Json::Value result = this->client->CallMethod("setMining",p);
- if (result.isArray())
- return result;
+ if (result.isBool())
+ return result.asBool();
else
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());