Skip to content

Commit

Permalink
fix: Fix transactions deadlock (blockscout#11623)
Browse files Browse the repository at this point in the history
  • Loading branch information
Qwerty5Uiop authored Jan 8, 2025
1 parent 3ad7c80 commit c9c620e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/explorer/lib/explorer/chain/import.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ defmodule Explorer.Chain.Import do
Import.Stage.BlockTransactionReferencing,
Import.Stage.TokenReferencing,
Import.Stage.TokenInstances,
Import.Stage.Logs,
Import.Stage.InternalTransactions,
Import.Stage.ChainTypeSpecific
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ defmodule Explorer.Chain.Import.Stage.BlockTransactionReferencing do
@runners [
Runner.TokenTransfers,
Runner.Transaction.Forks,
Runner.Logs,
Runner.Block.Rewards,
Runner.Block.SecondDegreeRelations,
Runner.TransactionActions,
Expand Down
27 changes: 27 additions & 0 deletions apps/explorer/lib/explorer/chain/import/stage/logs.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
defmodule Explorer.Chain.Import.Stage.Logs do
@moduledoc """
Import logs.
"""

alias Explorer.Chain.Import.{Runner, Stage}

@behaviour Stage

@runners [
Runner.Logs
]

@impl Stage
def runners, do: @runners

@impl Stage
def all_runners, do: runners()

@impl Stage
def multis(runner_to_changes_list, options) do
{final_multi, final_remaining_runner_to_changes_list} =
Stage.single_multi(runners(), runner_to_changes_list, options)

{[final_multi], final_remaining_runner_to_changes_list}
end
end

0 comments on commit c9c620e

Please sign in to comment.