Commit 1e26ab9c authored by Mark Tyneway's avatar Mark Tyneway

op-chain-ops: check for protocol version config

Ensures that the protocol version configs are in the deploy config
by adding them to the `Check()` function to the `DeployConfig` struct.
CI calls this function to ensure that all of the deploy configs have
set values.
parent c4ebe7fb
......@@ -352,6 +352,12 @@ func (d *DeployConfig) Check() error {
if d.L1BlockTime < d.L2BlockTime {
return fmt.Errorf("L2 block time (%d) is larger than L1 block time (%d)", d.L2BlockTime, d.L1BlockTime)
}
if d.RequiredProtocolVersion == (params.ProtocolVersion{}) {
return fmt.Errorf("%w: RequiredProtocolVersion cannot be empty", ErrInvalidDeployConfig)
}
if d.RecommendedProtocolVersion == (params.ProtocolVersion{}) {
return fmt.Errorf("%w: RecommendedProtocolVersion cannot be empty", ErrInvalidDeployConfig)
}
return nil
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment