do not update cache if no blocks were inserted

pull/2736/head
Ayrat Badykov 5 years ago
parent e7b3c3a452
commit 156c6ca455
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 2
      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)

Loading…
Cancel
Save