diff --git a/CHANGELOG.md b/CHANGELOG.md index 59e6d546ed..e603767f1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### Fixes - [#4236](https://github.com/blockscout/blockscout/pull/4236) - Fix typo, constructor instead of contructor +- [#4167](https://github.com/blockscout/blockscout/pull/4167) - Deduplicate block numbers in acquire_blocks function - [#4149](https://github.com/blockscout/blockscout/pull/4149) - Exclude smart_contract_additional_sources from JSON encoding in address schema - [#4137](https://github.com/blockscout/blockscout/pull/4137) - Get token balance query improvement - [#4038](https://github.com/blockscout/blockscout/pull/4038) - Add clause for abi_decode_address_output/1 when is_nil(address) diff --git a/apps/explorer/lib/explorer/chain/import/runner/internal_transactions.ex b/apps/explorer/lib/explorer/chain/import/runner/internal_transactions.ex index a836b86949..3f38efbfe8 100644 --- a/apps/explorer/lib/explorer/chain/import/runner/internal_transactions.ex +++ b/apps/explorer/lib/explorer/chain/import/runner/internal_transactions.ex @@ -214,7 +214,10 @@ defmodule Explorer.Chain.Import.Runner.InternalTransactions do end defp acquire_blocks(repo, changes_list) do - block_numbers = Enum.map(changes_list, & &1.block_number) + block_numbers = + changes_list + |> Enum.map(& &1.block_number) + |> Enum.dedup() query = from(