allow to set first indexing block

pull/1611/head
Ayrat Badykov 6 years ago
parent b07d57f682
commit 946b596abc
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 3
      apps/indexer/config/config.exs
  2. 2
      apps/indexer/lib/indexer/block/catchup/fetcher.ex

@ -33,7 +33,8 @@ config :indexer,
ecto_repos: [Explorer.Repo],
metadata_updater_days_interval: 7,
# bytes
memory_limit: 1 <<< 30
memory_limit: 1 <<< 30,
first_block: System.get_env("FIRST_BLOCK") || 0
# config :indexer, Indexer.ReplacedTransaction.Supervisor, disabled?: true
# config :indexer, Indexer.Block.Reward.Supervisor, disabled?: true

@ -80,7 +80,7 @@ defmodule Indexer.Block.Catchup.Fetcher do
_ ->
# realtime indexer gets the current latest block
first = latest_block_number - 1
last = 0
last = Application.get_env(:indexer, :first_block)
Logger.metadata(first_block_number: first, last_block_number: last)

Loading…
Cancel
Save