From 58822121216a1d431da5321377e412dabb99ef56 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 6 Jul 2020 15:10:16 +0300 Subject: [PATCH 1/2] Besu: Add revertReason key --- CHANGELOG.md | 1 + apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/receipt.ex | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9597989a84..94be483e9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features ### Fixes +- [#3182](https://github.com/poanetwork/blockscout/pull/3182) - Besu: support revertReason key in eth_getTransactionReceipt endpoint - [#3178](https://github.com/poanetwork/blockscout/pull/3178) - Fix permanent fetching tokens... when read/write proxy tab is active - [#3178](https://github.com/poanetwork/blockscout/pull/3178) - Fix unavailable navbar menu when read/write proxy tab is active diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/receipt.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/receipt.ex index cf1a74954a..8a7cd5f384 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/receipt.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/receipt.ex @@ -253,7 +253,7 @@ defmodule EthereumJSONRPC.Receipt do # hash format # gas is passed in from the `t:EthereumJSONRPC.Transaction.params/0` to allow pre-Byzantium status to be derived defp entry_to_elixir({key, _} = entry) - when key in ~w(blockHash contractAddress from gas logsBloom root to transactionHash), + when key in ~w(blockHash contractAddress from gas logsBloom root to transactionHash revertReason), do: {:ok, entry} defp entry_to_elixir({key, quantity}) From 3c4a1e1ccff57e79c8c01d085dc240ba26712bd3 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 13 Jul 2020 17:27:46 +0300 Subject: [PATCH 2/2] Handle empty block author reward --- apps/indexer/lib/indexer/block/fetcher.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/indexer/lib/indexer/block/fetcher.ex b/apps/indexer/lib/indexer/block/fetcher.ex index 1792b941ea..40ed68c6f6 100644 --- a/apps/indexer/lib/indexer/block/fetcher.ex +++ b/apps/indexer/lib/indexer/block/fetcher.ex @@ -434,7 +434,7 @@ defmodule Indexer.Block.Fetcher do {:ok, beneficiary_address} = Chain.string_to_address_hash(beneficiary.address_hash) "0x" <> minted_hex = beneficiary.reward - {minted, _} = Integer.parse(minted_hex, 16) + {minted, _} = if minted_hex == "", do: {0, ""}, else: Integer.parse(minted_hex, 16) if block_miner_payout_address && beneficiary_address.bytes == block_miner_payout_address.bytes do gas_payment = gas_payment(beneficiary, transactions_by_block_number)