block

package
v1.6.7 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyVersionsByEpochsList = errors.New("empty versions by epochs list")

ErrEmptyVersionsByEpochsList signals that an empty versions by epochs list was provided

View Source
var ErrInvalidSoftwareVersion = errors.New("invalid software version")

ErrInvalidSoftwareVersion signals that an invalid software version was provided

View Source
var ErrInvalidVersionOnEpochValues = errors.New("invalid version provided on epoch values")

ErrInvalidVersionOnEpochValues signals that the version element is not accepted because the epoch values are invalid

View Source
var ErrInvalidVersionStringTooLong = errors.New("invalid version provided: string too large")

ErrInvalidVersionStringTooLong signals that the version element is not accepted because it contains too large strings

View Source
var ErrNilCacher = errors.New("nil cacher")

ErrNilCacher signals that a nil cacher has been provided

View Source
var ErrNilHeaderVersionHandler = errors.New("nil error version handler")

ErrNilHeaderVersionHandler signals that a nil header version handler was provided

View Source
var ErrSoftwareVersionMismatch = errors.New("software versions mismatch")

ErrSoftwareVersionMismatch signals a software version mismatch

Functions

func NewHeaderVersionHandler

func NewHeaderVersionHandler(
	versionsByEpochs []config.VersionByEpochs,
	defaultVersion string,
	versionCache storage.Cacher,
) (*headerVersionHandler, error)

NewHeaderVersionHandler returns a new instance of a structure capable of handling the header versions

func NewMetaHeaderFactory

func NewMetaHeaderFactory(headerVersionHandler HeaderVersionGetter) (*metaHeaderVersionHandler, error)

NewMetaHeaderFactory creates a meta header factory instance

func NewShardHeaderFactory

func NewShardHeaderFactory(headerVersionHandler HeaderVersionGetter) (*shardHeaderFactory, error)

NewShardHeaderFactory creates a shard header factory instance

Types

type HeaderVersionGetter

type HeaderVersionGetter interface {
	GetVersion(epoch uint32) string
	IsInterfaceNil() bool
}

HeaderVersionGetter can get the header version based on epoch

Jump to

Keyboard shortcuts

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