Skip to content

Commit 8c29139

Browse files
committed
add validation for minimal_fork_sched
Signed-off-by: Masanori Yoshida <[email protected]>
1 parent 82eef3f commit 8c29139

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

relay/config.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,14 @@ func (prc ProverConfig) Validate() error {
101101
if prc.RefreshThresholdRate.Numerator > prc.RefreshThresholdRate.Denominator {
102102
return fmt.Errorf("config attribute \"refresh_threshold_rate\" must be less than or equal to 1.0: actual=%v/%v", prc.RefreshThresholdRate.Numerator, prc.RefreshThresholdRate.Denominator)
103103
}
104+
for hf := range prc.MinimalForkSched {
105+
switch hf {
106+
case Altair, Bellatrix, Capella, Deneb, Electra:
107+
// OK
108+
default:
109+
return fmt.Errorf("config attribute \"minimal_fork_sched\" contains an unknown key: %s", hf)
110+
}
111+
}
104112
return nil
105113
}
106114

0 commit comments

Comments
 (0)