forkid

package
v0.0.0-...-e2a46ae Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRemoteStale              = fmt.Errorf("stalled")
	ErrLocalIncompatibleOrStale = fmt.Errorf("incomptabible or stalled")
)

Functions

This section is empty.

Types

type ForkID

type ForkID struct {
	// contains filtered or unexported fields
}

func NewForkID

func NewForkID(genesis [32]byte, forks []uint64) *ForkID

func (*ForkID) At

func (f *ForkID) At(block uint64) ID

func (*ForkID) Validate

func (f *ForkID) Validate(localHead uint64, remoteID []byte, remoteNext uint64) error

type ID

type ID struct {
	Hash []byte // CRC32 checksum of the genesis block and passed fork block numbers
	Next uint64 // Block number of the next upcoming fork, or 0 if no forks are known
}

func (*ID) Equal

func (i *ID) Equal(ii *ID) bool

func (*ID) MarshalRLPWith

func (i *ID) MarshalRLPWith(ar *fastrlp.Arena) *fastrlp.Value

func (*ID) UnmarshalRLPWith

func (i *ID) UnmarshalRLPWith(v *fastrlp.Value) error

Jump to

Keyboard shortcuts

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