chunk_range

pull/411/head
Luke Imhoff 6 years ago
parent 7a530f2b9e
commit 308879d2ff
  1. 6
      apps/indexer/lib/indexer/block_fetcher.ex

@ -276,7 +276,10 @@ defmodule Indexer.BlockFetcher do
@doc false
def chunk_ranges(ranges, size) do
Enum.flat_map(ranges, fn range ->
Enum.flat_map(ranges, &chunk_range(&1, size))
end
defp chunk_range(range, size) do
count = Enum.count(range)
if count <= size do
@ -300,7 +303,6 @@ defmodule Indexer.BlockFetcher do
end)
|> Enum.reverse()
end
end)
end
defp realtime_task(%{json_rpc_named_arguments: json_rpc_named_arguments} = state) do

Loading…
Cancel
Save