epochproviders

package
v1.2.35 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCannotGetLatestEpochStartMetaBlock = errors.New("cannot fetch the latest epoch start meta block from the network: timeout")

ErrCannotGetLatestEpochStartMetaBlock signals that the latest epoch start meta block cannot be fetched from the network

View Source
var ErrComponentClosing = errors.New("cannot fetch the latest epoch start meta block from the network: context closing")

ErrComponentClosing signals that the latest epoch start meta block cannot be fetched from network because the component is closing

View Source
var ErrInvalidRoundTimeInMilliseconds = errors.New("invalid round time in milliseconds value")

ErrInvalidRoundTimeInMilliseconds signals that the provided RoundTimeInMilliseconds value is incorrect

View Source
var ErrInvalidRoundsPerEpoch = errors.New("invalid rounds per epoch value")

ErrInvalidRoundsPerEpoch signals that the provided RoundsPerEpoch value is incorrect

View Source
var ErrInvalidStartTime = errors.New("invalid start time value")

ErrInvalidStartTime signals that the provided start time is incorrect

View Source
var ErrNilEpochStartMetaBlockInterceptor = errors.New("nil epoch start meta block interceptor")

ErrNilEpochStartMetaBlockInterceptor signals that a nil epoch start meta block interceptor has been provided

View Source
var ErrNilMessenger = errors.New("nil messenger")

ErrNilMessenger signals that a nil messenger has been provided

View Source
var ErrNilRequestHandler = errors.New("nil request handler")

ErrNilRequestHandler signals that a nil request handler has been provided

Functions

func NewArithmeticEpochProvider added in v1.2.0

func NewArithmeticEpochProvider(arg ArgArithmeticEpochProvider) (*arithmeticEpochProvider, error)

NewArithmeticEpochProvider returns a new arithmetic epoch provider able to mathematically compute the current network epoch based on the last block saved, considering the block's timestamp and epoch in respect with the current time

Types

type ArgArithmeticEpochProvider added in v1.2.0

type ArgArithmeticEpochProvider struct {
	RoundsPerEpoch          uint32
	RoundTimeInMilliseconds uint64
	StartTime               int64
}

ArgArithmeticEpochProvider is the argument structure for the arithmetic epoch provider

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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