Skip to content

Commit

Permalink
sanity check configuration when running in recovery mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jonastheis committed Nov 6, 2024
1 parent b23eb93 commit afdc961
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rollup/da_syncer/syncing_pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ func NewSyncingPipeline(ctx context.Context, blockchain *core.BlockChain, genesi
var initialL1Block uint64
if config.RecoveryMode {
initialL1Block = config.InitialL1Block
if initialL1Block == 0 {
return nil, errors.New("sync from DA: initial L1 block must be set in recovery mode")
}
if config.InitialBatch == 0 {
return nil, errors.New("sync from DA: initial batch must be set in recovery mode")
}

log.Info("sync from DA: initializing pipeline in recovery mode", "initialL1Block", initialL1Block, "initialBatch", config.InitialBatch)
} else {
initialL1Block = l1DeploymentBlock - 1
Expand Down

0 comments on commit afdc961

Please sign in to comment.