Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
remove -1 in fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
Santiago Pittella authored and Santiago Pittella committed Oct 18, 2023
1 parent c6777e4 commit 1034d47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/starknet_explorer/blockchain/state_sync_system.ex
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ defmodule StarknetExplorer.Blockchain.StateSyncSystem do

state = %StateSyncSystem{
current_block_number: block_height,
next_to_fetch: lowest_block_number - 1,
next_to_fetch: lowest_block_number,
updater_block_number: lowest_not_finished_block_number,
network: network
}
Expand Down Expand Up @@ -114,7 +114,7 @@ defmodule StarknetExplorer.Blockchain.StateSyncSystem do
Logger.debug("[Fetcher] Fetcher fetching: #{inspect(next_to_fetch)}")

{:ok, next_to_fetch} =
case BlockUtils.fetch_store_and_cache(next_to_fetch - 1, network) do
case BlockUtils.fetch_store_and_cache(next_to_fetch, network) do
{:ok, :already_stored} ->
{:ok, lowest_number} = BlockUtils.get_lowest_block_number(network)
{:ok, lowest_number - 1}
Expand Down

0 comments on commit 1034d47

Please sign in to comment.