|
|
|
@ -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 |
|
|
|
|