|
|
@ -82,7 +82,7 @@ defmodule Indexer.Block.Catchup.Fetcher do |
|
|
|
_ -> |
|
|
|
_ -> |
|
|
|
# realtime indexer gets the current latest block |
|
|
|
# realtime indexer gets the current latest block |
|
|
|
first = latest_block_number - 1 |
|
|
|
first = latest_block_number - 1 |
|
|
|
last = Application.get_env(:indexer, :first_block) |
|
|
|
last = last_block() |
|
|
|
|
|
|
|
|
|
|
|
Logger.metadata(first_block_number: first, last_block_number: last) |
|
|
|
Logger.metadata(first_block_number: first, last_block_number: last) |
|
|
|
|
|
|
|
|
|
|
@ -328,4 +328,13 @@ defmodule Indexer.Block.Catchup.Fetcher do |
|
|
|
{:error, :queue_unavailable} |
|
|
|
{:error, :queue_unavailable} |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
defp last_block do |
|
|
|
|
|
|
|
string_value = Application.get_env(:indexer, :first_block) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case Integer.parse(string_value) do |
|
|
|
|
|
|
|
{integer, ""} -> integer |
|
|
|
|
|
|
|
_ -> 0 |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|