mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
eth_getBlock returns also transactions
This commit is contained in:
parent
4aaa414a83
commit
4e115bc671
@ -218,20 +218,22 @@ class WebThreeStubClient : public jsonrpc::Client
|
|||||||
else
|
else
|
||||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||||
}
|
}
|
||||||
Json::Value eth_getBlockByHash(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
Json::Value eth_getBlockByHash(const std::string& param1, bool param2) throw (jsonrpc::JsonRpcException)
|
||||||
{
|
{
|
||||||
Json::Value p;
|
Json::Value p;
|
||||||
p.append(param1);
|
p.append(param1);
|
||||||
|
p.append(param2);
|
||||||
Json::Value result = this->CallMethod("eth_getBlockByHash",p);
|
Json::Value result = this->CallMethod("eth_getBlockByHash",p);
|
||||||
if (result.isObject())
|
if (result.isObject())
|
||||||
return result;
|
return result;
|
||||||
else
|
else
|
||||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||||
}
|
}
|
||||||
Json::Value eth_getBlockByNumber(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
Json::Value eth_getBlockByNumber(const std::string& param1, bool param2) throw (jsonrpc::JsonRpcException)
|
||||||
{
|
{
|
||||||
Json::Value p;
|
Json::Value p;
|
||||||
p.append(param1);
|
p.append(param1);
|
||||||
|
p.append(param2);
|
||||||
Json::Value result = this->CallMethod("eth_getBlockByNumber",p);
|
Json::Value result = this->CallMethod("eth_getBlockByNumber",p);
|
||||||
if (result.isObject())
|
if (result.isObject())
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user