Add consensus filter to AddRefetchNeededToBlock migration

It is unnecessary to set `refetch_needed` to blocks that do not yet have a consensus, so this small change can save some time in the migration and avoid some checking from the temporary fetcher.
pull/2027/head
pasqu4le 6 years ago
parent 1bd2dcdda2
commit 728d25bcf4
No known key found for this signature in database
GPG Key ID: 8F3EE01F1DC90687
  1. 2
      apps/explorer/priv/repo/migrations/20190513134025_add_refetch_needed_to_block.exs

@ -6,6 +6,6 @@ defmodule Explorer.Repo.Migrations.AddRefetchNeededToBlock do
add(:refetch_needed, :boolean, default: false) add(:refetch_needed, :boolean, default: false)
end end
execute("UPDATE blocks SET refetch_needed = TRUE;", "") execute("UPDATE blocks SET refetch_needed = TRUE WHERE consensus", "")
end end
end end

Loading…
Cancel
Save