prysm-pulse/runtime/version/fork.go
kasey 395e49972e
prysmctl support generating non-phase0 genesis.ssz (#11677)
* support generating non-phase0 genesis.ssz

* make default (Value) work for EnumValue + lint

* remove messy punctuation

* Ran gazelle for @kasey

* Fix deps viz

Co-authored-by: Kasey Kirkham <kasey@users.noreply.github.com>
Co-authored-by: prestonvanloon <preston@prysmaticlabs.com>
2022-11-23 14:22:24 +00:00

29 lines
423 B
Go

package version
const (
Phase0 = iota
Altair
Bellatrix
Capella
)
func String(version int) string {
switch version {
case Phase0:
return "phase0"
case Altair:
return "altair"
case Bellatrix:
return "bellatrix"
case Capella:
return "capella"
default:
return "unknown version"
}
}
// All returns a list of all known fork versions.
func All() []int {
return []int{Phase0, Altair, Bellatrix, Capella}
}