diff --git a/apps/explorer/lib/explorer/chain/block/range.ex b/apps/explorer/lib/explorer/chain/block/range.ex index 26bf902142..c60cd2039d 100644 --- a/apps/explorer/lib/explorer/chain/block/range.ex +++ b/apps/explorer/lib/explorer/chain/block/range.ex @@ -136,10 +136,12 @@ defmodule Explorer.Chain.Block.Range do def load(_), do: :error + defp parse_upper(%PGRange{upper: :unbound}), do: :infinity defp parse_upper(%PGRange{upper: nil}), do: :infinity defp parse_upper(%PGRange{upper: upper, upper_inclusive: true}), do: upper defp parse_upper(%PGRange{upper: upper, upper_inclusive: false}), do: upper - 1 + defp parse_upper(%PGRange{lower: :unbound}), do: :negative_infinity defp parse_lower(%PGRange{lower: nil}), do: :negative_infinity defp parse_lower(%PGRange{lower: lower, lower_inclusive: true}), do: lower defp parse_lower(%PGRange{lower: lower, lower_inclusive: false}), do: lower + 1