Commit 45200bba authored by zhiqiangxu's avatar zhiqiangxu Committed by GitHub

disallow unknown fields in rollup config (#11052)

parent 4a525b59
......@@ -235,7 +235,9 @@ Conflicting configuration is deprecated, and will stop the op-node from starting
defer file.Close()
var rollupConfig rollup.Config
if err := json.NewDecoder(file).Decode(&rollupConfig); err != nil {
dec := json.NewDecoder(file)
dec.DisallowUnknownFields()
if err := dec.Decode(&rollupConfig); err != nil {
return nil, fmt.Errorf("failed to decode rollup config: %w", err)
}
return &rollupConfig, 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