Only count consensus blocks as not missing.

Fixes #838
pull/845/head
Luke Imhoff 6 years ago
parent dacab21f28
commit 1e14446ee9
  1. 5
      apps/explorer/lib/explorer/chain.ex

@ -1132,7 +1132,7 @@ defmodule Explorer.Chain do
end end
@doc """ @doc """
Calculates the ranges of missing blocks in `range`. Calculates the ranges of missing consensus blocks in `range`.
When there are no blocks, the entire range is missing. When there are no blocks, the entire range is missing.
@ -1196,7 +1196,8 @@ defmodule Explorer.Chain do
FROM generate_series(? :: bigint, ? :: bigint, ? :: bigint) AS number FROM generate_series(? :: bigint, ? :: bigint, ? :: bigint) AS number
EXCEPT EXCEPT
SELECT blocks.number SELECT blocks.number
FROM blocks) FROM blocks
WHERE blocks.consensus = true)
SELECT no_previous.number AS minimum, SELECT no_previous.number AS minimum,
(SELECT MIN(no_next.number) (SELECT MIN(no_next.number)
FROM missing_blocks AS no_next FROM missing_blocks AS no_next

Loading…
Cancel
Save