@ -1,12 +1,6 @@
defmodule Explorer.Repo.Migrations.AddIndexOnTransactionNonceAndFromAddressHash do
use Ecto.Migration
alias Ecto.Adapters.SQL
alias Explorer.Repo
# 30 minutes
@timeout 60_000 * 30
def change do
create(index(:transactions, [:nonce, :from_address_hash, :block_hash]))
create(index(:transactions, [:block_hash, :error]))
@ -90,10 +90,9 @@ defmodule Indexer.ReplacedTransaction.Fetcher do
Logger.debug("fetching replaced transactions for transactions")
try do
{:ok, _} =
entries
|> Enum.map(¶ms/1)
|> Chain.update_replaced_transactions()
:ok
rescue