Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
invocamanman committed May 22, 2024
1 parent dbe6f84 commit 10b6bd4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/v2/PolygonRollupManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -852,21 +852,21 @@ contract PolygonRollupManager is
RollupData storage rollup = rollupIDToRollupData[rollupID];
uint64 lastBatchSequenced = rollup.lastBatchSequenced;

// Sequence to rollback should already sequenced
// Batch to rollback should be already sequenced
if (batchToRollback >= lastBatchSequenced) {
revert RollbackBatchIsNotSequenced();
}

uint64 currentBatch = lastBatchSequenced;

// delete sequences
// delete sequence batches structs until the batchToRollback
while (currentBatch != batchToRollback) {
// Load previous end of sequence batch
currentBatch = rollup
.sequencedBatches[currentBatch]
.previousLastBatchSequenced;

// If batch to rollback was not end of sequence revert
// Batch to rollback must be end of a sequence
if (currentBatch < batchToRollback) {
revert RollbackBatchIsNotEndOfSequence();
}
Expand Down

0 comments on commit 10b6bd4

Please sign in to comment.