core: allow to create hard-fork
This commit is contained in:
parent
d1588115a2
commit
e70bf7d12e
6 changed files with 86 additions and 1 deletions
24
pkg/config/hardfork_string.go
Normal file
24
pkg/config/hardfork_string.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Code generated by "stringer -type Hardfork -linecomment ./pkg/config/hardfork.go"; DO NOT EDIT.
|
||||
|
||||
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[HF2712FixSyscallFees-1]
|
||||
}
|
||||
|
||||
const _Hardfork_name = "HF_2712_FixSyscallFees"
|
||||
|
||||
var _Hardfork_index = [...]uint8{0, 22}
|
||||
|
||||
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]]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue