| 398 | } |
| 399 | |
| 400 | Json::Value Eth::eth_getBlockByNumber(string const& _blockNumber, bool _includeTransactions) |
| 401 | { |
| 402 | try |
| 403 | { |
| 404 | BlockNumber h = jsToBlockNumber(_blockNumber); |
| 405 | if (!client()->isKnown(h)) |
| 406 | return Json::Value(Json::nullValue); |
| 407 | |
| 408 | if (_includeTransactions) |
| 409 | return toJson(client()->blockInfo(h), client()->blockDetails(h), client()->uncleHashes(h), client()->transactions(h), client()->sealEngine()); |
| 410 | else |
| 411 | return toJson(client()->blockInfo(h), client()->blockDetails(h), client()->uncleHashes(h), client()->transactionHashes(h), client()->sealEngine()); |
| 412 | } |
| 413 | catch (...) |
| 414 | { |
| 415 | BOOST_THROW_EXCEPTION(JsonRpcException(Errors::ERROR_RPC_INVALID_PARAMS)); |
| 416 | } |
| 417 | } |
| 418 | |
| 419 | Json::Value Eth::eth_getTransactionByHash(string const& _transactionHash) |
| 420 | { |
no test coverage detected