Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* fix + logs

* fix loop

* Revert "fix + logs"

This reverts commit 39ced69.
  • Loading branch information
ARR552 authored Apr 17, 2024
1 parent f543774 commit 5da5dbd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions synchronizer/synchronizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,9 @@ func (s *ClientSynchronizer) syncBlocksSequential(lastEthBlockSynced *state.Bloc
if lastEthBlockSynced.BlockNumber > 0 {
fromBlock = lastEthBlockSynced.BlockNumber
}
toBlock := fromBlock + s.cfg.SyncChunkSize

for {
toBlock := fromBlock + s.cfg.SyncChunkSize
if toBlock > lastKnownBlock.Uint64() {
toBlock = lastKnownBlock.Uint64()
}
Expand Down Expand Up @@ -659,7 +659,8 @@ func (s *ClientSynchronizer) syncBlocksSequential(lastEthBlockSynced *state.Bloc
break
}

fromBlock = toBlock
fromBlock = lastEthBlockSynced.BlockNumber
toBlock = toBlock + s.cfg.SyncChunkSize
}

return lastEthBlockSynced, nil
Expand Down

0 comments on commit 5da5dbd

Please sign in to comment.