Merge remote-tracking branch 'origin/master' into vb-fix-performance-of-coin-supply-api

pull/3132/head
Victor Baranov 4 years ago
commit f78dac3f8f
  1. 1
      CHANGELOG.md
  2. 12
      apps/ethereum_jsonrpc/lib/ethereum_jsonrpc.ex

@ -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

@ -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

Loading…
Cancel
Save