diff --git a/CHANGELOG.md b/CHANGELOG.md index a9b41b8375..c81a1d2084 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - [#2663](https://github.com/poanetwork/blockscout/pull/2663) - Fetch address counters in parallel ### Fixes +- [#2736](https://github.com/poanetwork/blockscout/pull/2736) - do not update cache if no blocks were inserted - [#2731](https://github.com/poanetwork/blockscout/pull/2731) - fix library verification - [#2718](https://github.com/poanetwork/blockscout/pull/2718) - Include all addresses taking part in transactions in wallets' addresses counter - [#2709](https://github.com/poanetwork/blockscout/pull/2709) - Fix stuck label and value for uncle block height diff --git a/apps/indexer/lib/indexer/block/fetcher.ex b/apps/indexer/lib/indexer/block/fetcher.ex index 1b95d84086..85b47cba6f 100644 --- a/apps/indexer/lib/indexer/block/fetcher.ex +++ b/apps/indexer/lib/indexer/block/fetcher.ex @@ -184,6 +184,8 @@ defmodule Indexer.Block.Fetcher do end end + defp update_block_cache([]), do: :ok + defp update_block_cache(blocks) when is_list(blocks) do {min_block, max_block} = Enum.min_max_by(blocks, & &1.number)