erigon-pulse/cl/clparams/version.go
a 9644e6d220
Implement SpecTests in native go, add fork_choice handler (#7422)
a few TODO: remain to make this not a draft

---------

Co-authored-by: Giulio <giulio.rebuffo@gmail.com>
2023-05-02 16:19:22 +02:00

27 lines
564 B
Go

package clparams
type StateVersion uint8
const (
Phase0Version StateVersion = 0
AltairVersion StateVersion = 1
BellatrixVersion StateVersion = 2
CapellaVersion StateVersion = 3 // Unimplemented!
)
// stringToClVersion converts the string to the current state version.
func StringToClVersion(s string) StateVersion {
switch s {
case "phase0":
return Phase0Version
case "altair":
return AltairVersion
case "bellatrix":
return BellatrixVersion
case "capella":
return CapellaVersion
default:
panic("unsupported fork version: " + s)
}
}