forksprotocol

package
v0.2.1-rc.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL