Skip to content

Commit

Permalink
fix migration when there is no transaction in a chain
Browse files Browse the repository at this point in the history
  • Loading branch information
bchamagne committed Feb 16, 2024
1 parent bccc53b commit 14a594f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions priv/migration_tasks/prod/1.4.8@aeip_21-1.exs
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,12 @@ defmodule Migration_1_4_8 do
do: fetch_transaction(last_chain_address, authorized_nodes),
else: nil

unless TransactionChain.transaction_exists?(last_chain_address) do
Replication.sync_transaction_chain(last_transaction, genesis_address, authorized_nodes,
self_repair: true
)
end
if not is_nil(last_transaction) && not TransactionChain.transaction_exists?(last_chain_address) do
Replication.sync_transaction_chain(last_transaction, genesis_address, authorized_nodes,
self_repair: true
)
end


inputs = fetch_transaction_inputs(last_chain_address, authorized_nodes)

Expand Down

0 comments on commit 14a594f

Please sign in to comment.