Skip to content

Commit

Permalink
staterecovery: fix small regression
Browse files Browse the repository at this point in the history
  • Loading branch information
jpnovais committed Feb 5, 2025
1 parent 5f09618 commit 03c147e
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,11 @@ class StateSynchronizerService(
): SafeFuture<List<BlockFromL1RecoveredData>> {
return elClient.getBlockNumberAndHash(blockParameter = BlockParameter.Tag.LATEST)
.thenApply { headBlock ->
blocks.dropWhile { it.header.blockNumber <= headBlock.number }
var filteredBlocks = blocks.dropWhile { it.header.blockNumber <= headBlock.number }
if (debugForceSyncStopBlockNumber != null) {
blocks.takeWhile { it.header.blockNumber <= debugForceSyncStopBlockNumber }
} else {
blocks
filteredBlocks = filteredBlocks.takeWhile { it.header.blockNumber <= debugForceSyncStopBlockNumber }
}
filteredBlocks
}
}

Expand Down

0 comments on commit 03c147e

Please sign in to comment.