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 and Stefan-Ethernal committed May 21, 2024
1 parent a144388 commit 6395e24
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 @@ -600,9 +600,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 @@ -689,7 +689,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 6395e24

Please sign in to comment.