Browse Source

Fix crash.

cl-refactor
Gav Wood 10 years ago
parent
commit
e203a3021d
  1. 14
      libweb3jsonrpc/WebThreeStubServerBase.cpp

14
libweb3jsonrpc/WebThreeStubServerBase.cpp

@ -265,12 +265,22 @@ std::string WebThreeStubServerBase::eth_balanceAt(string const& _address)
Json::Value WebThreeStubServerBase::eth_blockByHash(std::string const& _hash)
{
return toJson(client()->blockInfo(jsToFixed<32>(_hash)));
BlockInfo bi;
try {
bi = client()->blockInfo(jsToFixed<32>(_hash));
}
catch (...) {}
return toJson(bi);
}
Json::Value WebThreeStubServerBase::eth_blockByNumber(int _number)
{
return toJson(client()->blockInfo(client()->hashFromNumber(_number)));
BlockInfo bi;
try {
bi = client()->blockInfo(client()->hashFromNumber(_number));
}
catch (...) {}
return toJson(bi);
}
static TransactionSkeleton toTransaction(Json::Value const& _json)

Loading…
Cancel
Save