|
|
@ -8,7 +8,7 @@ defmodule Explorer.Chain.Import.Runner.Blocks do |
|
|
|
import Ecto.Query, only: [from: 2, subquery: 1] |
|
|
|
import Ecto.Query, only: [from: 2, subquery: 1] |
|
|
|
|
|
|
|
|
|
|
|
alias Ecto.{Changeset, Multi, Repo} |
|
|
|
alias Ecto.{Changeset, Multi, Repo} |
|
|
|
|
|
|
|
alias Explorer.Chain |
|
|
|
alias Explorer.Chain.{Address, Block, Import, Log, PendingBlockOperation, Transaction} |
|
|
|
alias Explorer.Chain.{Address, Block, Import, Log, PendingBlockOperation, Transaction} |
|
|
|
alias Explorer.Chain.Block.Reward |
|
|
|
alias Explorer.Chain.Block.Reward |
|
|
|
alias Explorer.Chain.Import.Runner |
|
|
|
alias Explorer.Chain.Import.Runner |
|
|
@ -306,6 +306,8 @@ defmodule Explorer.Chain.Import.Runner.Blocks do |
|
|
|
timeout: timeout |
|
|
|
timeout: timeout |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:ok = Chain.remove_nonconsensus_blocks_from_pending_ops(removed_consensus_block_hashes) |
|
|
|
|
|
|
|
|
|
|
|
{:ok, removed_consensus_block_hashes} |
|
|
|
{:ok, removed_consensus_block_hashes} |
|
|
|
rescue |
|
|
|
rescue |
|
|
|
postgrex_error in Postgrex.Error -> |
|
|
|
postgrex_error in Postgrex.Error -> |
|
|
|