Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrForceEpochStartCanBeCalledOnlyOnNewRound = errors.New("invalid time to call force start of epoch, possible only on new round")
ErrForceEpochStartCanBeCalledOnlyOnNewRound signals that force start of epoch was called on wrong round
var ErrInvalidSettingsForEpochStartTrigger = errors.New("invalid start of epoch trigger settings")
ErrInvalidSettingsForEpochStartTrigger signals that settings for start of epoch trigger are invalid
var ErrMetaHdrNotFound = errors.New("meta header not found")
ErrMetaHdrNotFound signals that metaheader was not found
var ErrNilArgsNewMetaEpochStartTrigger = errors.New("nil arguments for meta start of epoch trigger")
ErrNilArgsNewMetaEpochStartTrigger signals that nil arguments were provided
var ErrNilArgsNewShardEpochStartTrigger = errors.New("nil arguments for shard start of epoch trigger")
ErrNilArgsNewShardEpochStartTrigger signals that nil arguments for shard epoch trigger has been provided
var ErrNilArgsPendingMiniblocks = errors.New("nil arguments for pending miniblock object")
ErrNilArgsPendingMiniblocks signals that nil argument was passed
var ErrNilDataPoolsHolder = errors.New("nil data pools holder")
ErrNilDataPoolsHolder signals that nil data pools holder has been provided
var ErrNilEpochStartNotifier = errors.New("nil epoch start notifier")
ErrNilEpochStartNotifier signals that nil epoch start notifier has been provided
var ErrNilEpochStartSettings = errors.New("nil start of epoch settings")
ErrNilEpochStartSettings signals that nil start of epoch settings has been provided
var ErrNilHasher = errors.New("nil hasher")
ErrNilHasher signals that nil hasher has been provided
var ErrNilHeaderHandler = errors.New("nil header handler")
ErrNilHeaderHandler signals that a nil header handler has been provided
var ErrNilHeaderValidator = errors.New("nil header validator")
ErrNilHeaderValidator signals that nil header validator has been provided
var ErrNilMarshalizer = errors.New("nil marshalizer")
ErrNilMarshalizer signals that nil marshalizer has been provided
var ErrNilMetaBlockStorage = errors.New("nil metablocks storage")
ErrNilMetaBlockStorage signals that nil metablocks storage has been provided
var ErrNilMetaBlocksPool = errors.New("nil metablocks pool")
ErrNilMetaBlocksPool signals that nil metablock pools holder has been provided
var ErrNilMetaHdrStorage = errors.New("nil meta header storage")
ErrNilMetaHdrStorage signals that nil meta header storage has been provided
var ErrNilMetaNonceHashStorage = errors.New("nil meta nonce hash storage")
ErrNilMetaNonceHashStorage signals that nil meta header nonce hash storage has been provided
var ErrNilRequestHandler = errors.New("nil request handler")
ErrNilRequestHandler signals that nil request handler has been provided
var ErrNilStorage = errors.New("nil storage")
ErrNilStorage signals that nil storage has been provided
var ErrNilStorageService = errors.New("nil storage service")
ErrNilStorageService signals that nil storage service has been provided
var ErrNilUint64Converter = errors.New("nil uint64 converter")
ErrNilUint64Converter signals that nil uint64 converter has been provided
var ErrNotEnoughRoundsBetweenEpochs = errors.New("tried to force start of epoch before passing of enough rounds")
ErrNotEnoughRoundsBetweenEpochs signals that not enough rounds has passed since last epoch start
var ErrSavedRoundIsHigherThanInput = errors.New("saved round is higher than input round")
ErrSavedRoundIsHigherThanInput signals that input round was wrong
var ErrSavedRoundIsHigherThanInputRound = errors.New("saved round is higher than input round")
ErrSavedRoundIsHigherThanInputRound signals that input round was wrong
var ErrWrongTypeAssertion = errors.New("wrong type assertion")
ErrWrongTypeAssertion signals wrong type assertion
Functions ¶
func NewNilEpochHandler ¶ added in v1.0.81
func NewNilEpochHandler() *nilEpochHandler
NewNilEpochHandler will return a new instance of a nilEpochHandler
Types ¶
type HeaderValidator ¶
type HeaderValidator interface { IsHeaderConstructionValid(currHdr, prevHdr data.HeaderHandler) error IsInterfaceNil() bool }
HeaderValidator defines the actions needed to validate a header
type PendingMiniBlocksHandler ¶ added in v1.0.67
type PendingMiniBlocksHandler interface { PendingMiniBlockHeaders(lastNotarizedHeaders []data.HeaderHandler) ([]block.ShardMiniBlockHeader, error) AddProcessedHeader(handler data.HeaderHandler) error RevertHeader(handler data.HeaderHandler) error GetNumPendingMiniBlocksForShard(shardID uint32) uint32 SetNumPendingMiniBlocksForShard(shardID uint32, numPendingMiniBlocks uint32) IsInterfaceNil() bool }
PendingMiniBlocksHandler defines the actions which should be handled by pending miniblocks implementation
type RequestHandler ¶
type RequestHandler interface { RequestShardHeader(shardId uint32, hash []byte) RequestMetaHeader(hash []byte) RequestMetaHeaderByNonce(nonce uint64) RequestShardHeaderByNonce(shardId uint32, nonce uint64) IsInterfaceNil() bool }
RequestHandler defines the methods through which request to data can be made
type Rounder ¶
type Rounder interface { // Index returns the current round Index() int64 // TimeStamp returns the time stamp of the round TimeStamp() time.Time IsInterfaceNil() bool }
Rounder defines the actions which should be handled by a round implementation
type StartOfEpochNotifier ¶ added in v1.0.67
type StartOfEpochNotifier interface { NotifyAll(hdr data.HeaderHandler) IsInterfaceNil() bool }
StartOfEpochNotifier defines what triggers should do for subscribed functions
type TriggerHandler ¶
type TriggerHandler interface { ForceEpochStart(round uint64) error IsEpochStart() bool Epoch() uint32 ReceivedHeader(header data.HeaderHandler) Update(round uint64) EpochStartRound() uint64 EpochStartMetaHdrHash() []byte SetProcessed(header data.HeaderHandler) SetFinalityAttestingRound(round uint64) EpochFinalityAttestingRound() uint64 Revert(round uint64) SetCurrentEpochStartRound(round uint64) IsInterfaceNil() bool }
TriggerHandler defines the functionalities for an start of epoch trigger