Skip to content

Commit

Permalink
fix kurtosis test
Browse files Browse the repository at this point in the history
  • Loading branch information
ARR552 committed Aug 30, 2024
1 parent 446c2c0 commit cc22e0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion zk/datastream/server/datastream_populate.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package server

import (
"context"
"errors"
"fmt"
"time"

Expand Down Expand Up @@ -365,7 +366,7 @@ func (srv *DataStreamServer) WriteGenesisToStream(
tx kv.Tx,
) error {
batchNo, err := reader.GetBatchNoByL2Block(0)
if err != nil {
if err != nil && !errors.Is(err, hermez_db.ErrorNotStored) {
return err
}

Expand Down
4 changes: 2 additions & 2 deletions zk/stages/stage_batches.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func SpawnStageBatches(

// get batch for batches progress
stageProgressBatchNo, err := hermezDb.GetBatchNoByL2Block(stageProgressBlockNo)
if err != nil {
if err != nil && !errors.Is(err, hermez_db.ErrorNotStored) {
return fmt.Errorf("get batch no by l2 block error: %v", err)
}

Expand Down Expand Up @@ -523,7 +523,7 @@ func UnwindBatchesStage(u *stagedsync.UnwindState, tx kv.RwTx, cfg BatchesCfg, c
}

fromBatchPrev, err := hermezDb.GetBatchNoByL2Block(fromBlock - 1)
if err != nil {
if err != nil && !errors.Is(err, hermez_db.ErrorNotStored) {
return fmt.Errorf("get batch no by l2 block error: %v", err)
}
fromBatch, err := hermezDb.GetBatchNoByL2Block(fromBlock)
Expand Down

0 comments on commit cc22e0d

Please sign in to comment.