Skip to content

Commit

Permalink
keep fork from original stream for bad batches (#630)
Browse files Browse the repository at this point in the history
  • Loading branch information
hexoscott authored Jun 14, 2024
1 parent 28d62ad commit 3107569
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions zk/stages/stage_batches.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@ LOOP:
if err = hermezDb.WriteInvalidBatch(batchStart.Number); err != nil {
return err
}
// we need to write the fork here as well because the batch will never get processed as it is invalid
// but, we need it re-populate our own stream
if err = hermezDb.WriteForkId(batchStart.Number, batchStart.ForkId); err != nil {
return err
}
}
_ = batchStart
case l2Block := <-l2BlockChan:
Expand Down

0 comments on commit 3107569

Please sign in to comment.