From 80cbe9ea1c68fdb5b930302d6a8e84ebc7bf9dc0 Mon Sep 17 00:00:00 2001 From: Qwerty5Uiop <105209995+Qwerty5Uiop@users.noreply.github.com> Date: Wed, 8 Jan 2025 12:56:35 +0400 Subject: [PATCH] fix: Fix addresses deadlock (#11616) --- apps/explorer/lib/explorer/chain/import.ex | 6 ++++-- .../explorer/chain/import/stage/{tokens.ex => blocks.ex} | 6 +++--- apps/explorer/lib/explorer/chain/import/stage/main.ex | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) rename apps/explorer/lib/explorer/chain/import/stage/{tokens.ex => blocks.ex} (84%) diff --git a/apps/explorer/lib/explorer/chain/import.ex b/apps/explorer/lib/explorer/chain/import.ex index b7f0bdc0dbfe..d2229641e069 100644 --- a/apps/explorer/lib/explorer/chain/import.ex +++ b/apps/explorer/lib/explorer/chain/import.ex @@ -13,8 +13,10 @@ defmodule Explorer.Chain.Import do @stages [ [ - Import.Stage.Main, - Import.Stage.Tokens + Import.Stage.Blocks + ], + [ + Import.Stage.Main ], [ Import.Stage.BlockTransactionReferencing, diff --git a/apps/explorer/lib/explorer/chain/import/stage/tokens.ex b/apps/explorer/lib/explorer/chain/import/stage/blocks.ex similarity index 84% rename from apps/explorer/lib/explorer/chain/import/stage/tokens.ex rename to apps/explorer/lib/explorer/chain/import/stage/blocks.ex index 23d7c385661a..205acd55453f 100644 --- a/apps/explorer/lib/explorer/chain/import/stage/tokens.ex +++ b/apps/explorer/lib/explorer/chain/import/stage/blocks.ex @@ -1,6 +1,6 @@ -defmodule Explorer.Chain.Import.Stage.Tokens do +defmodule Explorer.Chain.Import.Stage.Blocks do @moduledoc """ - Imports tokens. + Import blocks. """ alias Explorer.Chain.Import.{Runner, Stage} @@ -8,7 +8,7 @@ defmodule Explorer.Chain.Import.Stage.Tokens do @behaviour Stage @runners [ - Runner.Tokens + Runner.Blocks ] @impl Stage diff --git a/apps/explorer/lib/explorer/chain/import/stage/main.ex b/apps/explorer/lib/explorer/chain/import/stage/main.ex index 131cca4ee3a2..7df0f93aecf0 100644 --- a/apps/explorer/lib/explorer/chain/import/stage/main.ex +++ b/apps/explorer/lib/explorer/chain/import/stage/main.ex @@ -1,6 +1,6 @@ defmodule Explorer.Chain.Import.Stage.Main do @moduledoc """ - Imports main data (addresses, address_coin_balances, address_coin_balances_daily, tokens, blocks, transactions). + Imports main data (addresses, address_coin_balances, address_coin_balances_daily, tokens, transactions). """ alias Explorer.Chain.Import.{Runner, Stage} @@ -10,7 +10,7 @@ defmodule Explorer.Chain.Import.Stage.Main do @addresses_runner Runner.Addresses @rest_runners [ - Runner.Blocks, + Runner.Tokens, Runner.Address.CoinBalances, Runner.Address.CoinBalancesDaily, Runner.Transactions