Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check prior fork consistently #9255

Merged
merged 7 commits into from
Feb 2, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions op-node/rollup/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,20 @@ func (cfg *Config) Check() error {
if cfg.L2ChainID.Sign() < 1 {
return ErrL2ChainIDNotPositive
}
if cfg.EcotoneTime != nil {
zhiqiangxu marked this conversation as resolved.
Show resolved Hide resolved
if cfg.CanyonTime == nil {
return fmt.Errorf("prior fork canyon activation time is missing")
}
if *cfg.CanyonTime > *cfg.EcotoneTime {
return fmt.Errorf("prior fork canyon has higher activation time")
}
if cfg.RegolithTime == nil {
return fmt.Errorf("prior fork regolith activation time is missing")
}
if *cfg.RegolithTime > *cfg.CanyonTime {
return fmt.Errorf("prior fork regolith has higher activation time")
}
}
trianglesphere marked this conversation as resolved.
Show resolved Hide resolved
return nil
}

trianglesphere marked this conversation as resolved.
Show resolved Hide resolved
Expand Down