Use hash for Block conflict_target

As the consensus block and zero or more non-consensus (uncle) blocks can
have the same number now, number is no longer unique and not a good
conflict_target, so switch to hash.
pull/802/head
Luke Imhoff 6 years ago
parent 07bd999e35
commit 12f789a96d
  1. 2
      apps/explorer/lib/explorer/chain/import.ex

@ -724,7 +724,7 @@ defmodule Explorer.Chain.Import do
{:ok, blocks} =
insert_changes_list(
ordered_changes_list,
conflict_target: :number,
conflict_target: :hash,
on_conflict: :replace_all,
for: Block,
returning: true,

Loading…
Cancel
Save