Browse Source

fixed eth_getTransactionByHash when transactionHash is unknown

cl-refactor
Marek Kotewicz 10 years ago
parent
commit
560f93be76
  1. 3
      libweb3jsonrpc/WebThreeStubServerBase.cpp

3
libweb3jsonrpc/WebThreeStubServerBase.cpp

@ -385,6 +385,9 @@ Json::Value WebThreeStubServerBase::eth_getTransactionByHash(string const& _tran
try try
{ {
h256 h = jsToFixed<32>(_transactionHash); h256 h = jsToFixed<32>(_transactionHash);
if (!client()->isKnownTransaction(h))
return Json::Value(Json::nullValue);
auto l = client()->transactionLocation(h); auto l = client()->transactionLocation(h);
return toJson(client()->transaction(h), l, client()->numberFromHash(l.first)); return toJson(client()->transaction(h), l, client()->numberFromHash(l.first));
} }

Loading…
Cancel
Save