block

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: GPL-3.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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