|
|
@ -28,6 +28,7 @@ defmodule Indexer.Block.Realtime.Fetcher do |
|
|
|
alias EthereumJSONRPC.{Blocks, FetchedBalances, Subscription} |
|
|
|
alias EthereumJSONRPC.{Blocks, FetchedBalances, Subscription} |
|
|
|
alias Explorer.Chain |
|
|
|
alias Explorer.Chain |
|
|
|
alias Explorer.Chain.Cache.Accounts |
|
|
|
alias Explorer.Chain.Cache.Accounts |
|
|
|
|
|
|
|
alias Explorer.Chain.Events.Publisher |
|
|
|
alias Explorer.Counters.AverageBlockTime |
|
|
|
alias Explorer.Counters.AverageBlockTime |
|
|
|
alias Indexer.{Block, Tracer} |
|
|
|
alias Indexer.{Block, Tracer} |
|
|
|
alias Indexer.Block.Realtime.TaskSupervisor |
|
|
|
alias Indexer.Block.Realtime.TaskSupervisor |
|
|
@ -85,6 +86,7 @@ defmodule Indexer.Block.Realtime.Fetcher do |
|
|
|
) |
|
|
|
) |
|
|
|
when is_binary(quantity) do |
|
|
|
when is_binary(quantity) do |
|
|
|
number = quantity_to_integer(quantity) |
|
|
|
number = quantity_to_integer(quantity) |
|
|
|
|
|
|
|
Publisher.broadcast([{:last_block_number, number}], :realtime) |
|
|
|
# Subscriptions don't support getting all the blocks and transactions data, |
|
|
|
# Subscriptions don't support getting all the blocks and transactions data, |
|
|
|
# so we need to go back and get the full block |
|
|
|
# so we need to go back and get the full block |
|
|
|
start_fetch_and_import(number, block_fetcher, previous_number, max_number_seen) |
|
|
|
start_fetch_and_import(number, block_fetcher, previous_number, max_number_seen) |
|
|
|