From 156c6ca4551036ff42fc9c8df8cbea371f523a65 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Wed, 25 Sep 2019 13:36:50 +0300 Subject: [PATCH 1/2] do not update cache if no blocks were inserted --- apps/indexer/lib/indexer/block/fetcher.ex | 2 ++ 1 file changed, 2 insertions(+) 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) From 3fa83faf2caeaaada3445d9b8257c80753ab3144 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Wed, 25 Sep 2019 13:39:09 +0300 Subject: [PATCH 2/2] add CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6791e814b7..da3cf2b091 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 - [#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 - [#2707](https://github.com/poanetwork/blockscout/pull/2707) - fix for dashboard banner chart legend items