diff --git a/CHANGELOG.md b/CHANGELOG.md index d8bb769e71..9e1c51fba5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - [#2834](https://github.com/poanetwork/blockscout/pull/2834) - always redirect to checksummed hash ### Fixes +- [#3028](https://github.com/poanetwork/blockscout/pull/3028) - Decrease polling period value for realtime fetcher - [#3027](https://github.com/poanetwork/blockscout/pull/3027) - Rescue for SUPPORTED_CHAINS env var parsing - [#3025](https://github.com/poanetwork/blockscout/pull/3025) - Fix splitting of indexer/web components setup - [#3024](https://github.com/poanetwork/blockscout/pull/3024) - Fix pool size default value in config diff --git a/apps/indexer/lib/indexer/block/realtime/fetcher.ex b/apps/indexer/lib/indexer/block/realtime/fetcher.ex index e60dcc255b..533a79c74c 100644 --- a/apps/indexer/lib/indexer/block/realtime/fetcher.ex +++ b/apps/indexer/lib/indexer/block/realtime/fetcher.ex @@ -37,7 +37,7 @@ defmodule Indexer.Block.Realtime.Fetcher do @behaviour Block.Fetcher - @minimum_safe_polling_period :timer.seconds(10) + @minimum_safe_polling_period :timer.seconds(5) @enforce_keys ~w(block_fetcher)a defstruct ~w(block_fetcher subscription previous_number max_number_seen timer)a @@ -157,7 +157,7 @@ defmodule Indexer.Block.Realtime.Fetcher do polling_period = case AverageBlockTime.average_block_time() do {:error, :disabled} -> 2_000 - block_time -> round(Duration.to_milliseconds(block_time) * 2) + block_time -> round(Duration.to_milliseconds(block_time) / 2) end safe_polling_period = max(polling_period, @minimum_safe_polling_period)