From 3d0ef1efc90af11c38a1c2d3b9cfcac17d7404cc Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Thu, 18 Aug 2022 13:00:39 +0300 Subject: [PATCH 1/2] Fix unexpected messages in CoinBalanceOnDemand --- .../lib/indexer/fetcher/coin_balance_on_demand.ex | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/indexer/lib/indexer/fetcher/coin_balance_on_demand.ex b/apps/indexer/lib/indexer/fetcher/coin_balance_on_demand.ex index ac02a8f2d2..68306347ed 100644 --- a/apps/indexer/lib/indexer/fetcher/coin_balance_on_demand.ex +++ b/apps/indexer/lib/indexer/fetcher/coin_balance_on_demand.ex @@ -64,10 +64,12 @@ defmodule Indexer.Fetcher.CoinBalanceOnDemand do GenServer.start_link(__MODULE__, json_rpc_named_arguments, server_opts) end + @impl true def init(json_rpc_named_arguments) do {:ok, %{json_rpc_named_arguments: json_rpc_named_arguments}} end + @impl true def handle_cast({:fetch_and_update, block_number, address}, state) do result = fetch_and_update(block_number, address, state.json_rpc_named_arguments) @@ -78,18 +80,30 @@ defmodule Indexer.Fetcher.CoinBalanceOnDemand do {:noreply, state} end + @impl true def handle_cast({:fetch_and_import, block_number, address}, state) do fetch_and_import(block_number, address, state.json_rpc_named_arguments) {:noreply, state} end + @impl true def handle_cast({:fetch_and_import_daily_balances, block_number, address}, state) do fetch_and_import_daily_balances(block_number, address, state.json_rpc_named_arguments) {:noreply, state} end + @impl true + def handle_info({:DOWN, _, :process, _, _}, state) do + {:noreply, state} + end + + @impl true + def handle_info({_ref, _}, state) do + {:noreply, state} + end + ## Implementation defp do_trigger_fetch(%Address{fetched_coin_balance_block_number: nil} = address, latest_block_number, _) do From 98a7028aef1c6e99bfc35a5a95bd02b06ecde51f Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop Date: Thu, 18 Aug 2022 15:30:05 +0300 Subject: [PATCH 2/2] Update Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bda647d62..0c6608d5ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - [#5809](https://github.com/blockscout/blockscout/pull/5809) - Fix 404 on `/metadata` page - [#5807](https://github.com/blockscout/blockscout/pull/5807) - Update Makefile migrate command due to release build - [#5786](https://github.com/blockscout/blockscout/pull/5786) - Replace `current_path` with `Controller.current_full_path` in two controllers +- [#5948](https://github.com/blockscout/blockscout/pull/5948) - Fix unexpected messages in `CoinBalanceOnDemand` ### Chore - [#5869](https://github.com/blockscout/blockscout/pull/5869) - Bump reduce-reducers from 0.4.3 to 1.0.4 in /apps/block_scout_web/assets