Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetForkEpoch ¶
func SetForkEpoch(targetEpoch types.Epoch, forkVersion ForkVersion)
SetForkEpoch injects a custom epoch for a specific version
NOTE: this is used for testing, in real scenario we won't allow using this to avoid conflicts
Types ¶
type ForkHandler ¶
type ForkHandler interface { // OnFork is called upon a ForkVersion change OnFork(forkVersion ForkVersion) error }
ForkHandler handles a fork event
type ForkVersion ¶
type ForkVersion string
ForkVersion represents a fork version
const ( // ForkVersionEmpty represents an empty version ForkVersionEmpty ForkVersion = "" // V0ForkVersion is the version for v0 V0ForkVersion ForkVersion = "v0" // V1ForkVersion is the version for v1 V1ForkVersion ForkVersion = "v1" // V2ForkVersion is the version for v2 V2ForkVersion ForkVersion = "v2" )
func GetCurrentForkVersion ¶
func GetCurrentForkVersion(currentEpoch types.Epoch) ForkVersion
GetCurrentForkVersion returns the current fork version
func (ForkVersion) String ¶
func (fv ForkVersion) String() string
Click to show internal directories.
Click to hide internal directories.