diff --git a/zk/stages/stage_batches_processor.go b/zk/stages/stage_batches_processor.go index 35da1b5658c..ab08d459c83 100644 --- a/zk/stages/stage_batches_processor.go +++ b/zk/stages/stage_batches_processor.go @@ -284,10 +284,10 @@ func (p *BatchesProcessor) processFullBlock(blockEntry *types.FullL2Block) (rest // unwind if we already have this block - could be a re-sequence event if blockEntry.L2BlockNumber < p.lastBlockHeight+1 { log.Warn(fmt.Sprintf("[%s] Skipping block %d, already processed, triggering unwind...", p.logPrefix, blockEntry.L2BlockNumber)) - if err = p.unwindFn(blockEntry.L2BlockNumber); err != nil { + if err = p.unwindFn(blockEntry.L2BlockNumber - 1); err != nil { return 0, false, false, err } - return blockEntry.L2BlockNumber, false, true, nil + return blockEntry.L2BlockNumber - 1, false, true, nil } // check for sequential block numbers