neo-go/pkg/config/hardfork_string.go

26 lines
651 B
Go
Raw Normal View History

// Code generated by "stringer -type=Hardfork -linecomment"; DO NOT EDIT.
2022-05-06 12:19:17 +00:00
package config
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[HFAspidochelone-1]
_ = x[HFBasilisk-2]
2022-05-06 12:19:17 +00:00
}
const _Hardfork_name = "AspidocheloneBasilisk"
2022-05-06 12:19:17 +00:00
var _Hardfork_index = [...]uint8{0, 13, 21}
2022-05-06 12:19:17 +00:00
func (i Hardfork) String() string {
i -= 1
if i >= Hardfork(len(_Hardfork_index)-1) {
return "Hardfork(" + strconv.FormatInt(int64(i+1), 10) + ")"
}
return _Hardfork_name[_Hardfork_index[i]:_Hardfork_index[i+1]]
}