Skip to content

Commit

Permalink
Pass the unwinding test
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Aug 29, 2024
1 parent 84c3991 commit 04197b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zk/stages/stage_batches.go
Original file line number Diff line number Diff line change
Expand Up @@ -992,14 +992,14 @@ func rollback(logPrefix string, eriDb *erigon_db.ErigonDb, hermezDb *hermez_db.H
}
log.Debug(fmt.Sprintf("[%s] The common ancestor for datastream and db is block %d (%s)", logPrefix, ancestorBlockNum, ancestorBlockHash))

unwindBlockNum, unwindBlockHash, batchNum, err := getUnwindPoint(eriDb, hermezDb, ancestorBlockNum, ancestorBlockHash)
unwindBlockNum, unwindBlockHash, _, err := getUnwindPoint(eriDb, hermezDb, ancestorBlockNum, ancestorBlockHash)
if err != nil {
return err
}

if err = stages.SaveStageProgress(tx, stages.HighestSeenBatchNumber, batchNum-1); err != nil {
return err
}
// if err = stages.SaveStageProgress(tx, stages.HighestSeenBatchNumber, batchNum-1); err != nil {
// return err
// }
log.Warn(fmt.Sprintf("[%s] Unwinding to block %d (%s)", logPrefix, unwindBlockNum, unwindBlockHash))
u.UnwindTo(unwindBlockNum, unwindBlockHash)
return nil
Expand Down

0 comments on commit 04197b9

Please sign in to comment.