diff --git a/CHANGELOG.md b/CHANGELOG.md index 39968689cd..36cfb607c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features ### Fixes +- [#3133](https://github.com/poanetwork/blockscout/pull/3133) - Take into account FIRST_BLOCK in trace_ReplayBlockTransactions requests - [#3132](https://github.com/poanetwork/blockscout/pull/3132) - Fix performance of coin supply API endpoints - [#3130](https://github.com/poanetwork/blockscout/pull/3130) - Take into account FIRST_BLOCK for block rewards fetching - [#3128](https://github.com/poanetwork/blockscout/pull/3128) - Token instance metadata retriever refinement: add processing of token metadata if only image URL is passed to token URI diff --git a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex index 89e56b6125..a772f615c5 100644 --- a/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex +++ b/apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex @@ -305,9 +305,17 @@ defmodule EthereumJSONRPC do @doc """ Fetches internal transactions for entire blocks from variant API. """ - def fetch_block_internal_transactions(params_list, json_rpc_named_arguments) when is_list(params_list) do + def fetch_block_internal_transactions(block_numbers, json_rpc_named_arguments) when is_list(block_numbers) do + min_block = first_block_to_fetch() + + filtered_block_numbers = + block_numbers + |> Enum.filter(fn block_number -> + block_number >= min_block + end) + Keyword.fetch!(json_rpc_named_arguments, :variant).fetch_block_internal_transactions( - params_list, + filtered_block_numbers, json_rpc_named_arguments ) end