mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
setCoinbase method
This commit is contained in:
parent
0a069e51b3
commit
f9635e72aa
@ -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["l"] = l;
|
||||
p["address"] = address;
|
||||
|
||||
Json::Value result = this->client->CallMethod("setListening",p);
|
||||
if (result.isArray())
|
||||
return result;
|
||||
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());
|
||||
|
||||
}
|
||||
|
||||
Json::Value setMining(const bool& l) throw (jsonrpc::JsonRpcException)
|
||||
bool setListening(const bool& l) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p["l"] = l;
|
||||
|
||||
Json::Value result = this->client->CallMethod("setListening",p);
|
||||
if (result.isBool())
|
||||
return result.asBool();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
|
||||
}
|
||||
|
||||
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());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user