Documentation ¶
Index ¶
- func NewEpochStartTrigger(args *ArgsNewMetaEpochStartTrigger) (*trigger, error)
- func NewPendingMiniBlocks(args *ArgsPendingMiniBlocks) (*pendingMiniBlockHeaders, error)
- type ArgsNewMetaEpochStartTrigger
- type ArgsPendingMiniBlocks
- type TestTrigger
- func (t TestTrigger) Epoch() uint32
- func (t TestTrigger) EpochFinalityAttestingRound() uint64
- func (t TestTrigger) EpochStartMetaHdrHash() []byte
- func (t TestTrigger) EpochStartRound() uint64
- func (t TestTrigger) ForceEpochStart(round uint64) error
- func (t *TestTrigger) GetRoundsPerEpoch() uint64
- func (t TestTrigger) IsEpochStart() bool
- func (t TestTrigger) IsInterfaceNil() bool
- func (t TestTrigger) ReceivedHeader(_ data.HeaderHandler)
- func (t TestTrigger) Revert()
- func (t TestTrigger) SetCurrentEpochStartRound(round uint64)
- func (t TestTrigger) SetEpochStartMetaHdrHash(metaHdrHash []byte)
- func (t TestTrigger) SetFinalityAttestingRound(round uint64)
- func (t TestTrigger) SetProcessed(header data.HeaderHandler)
- func (t *TestTrigger) SetRoundsPerEpoch(roundsPerEpoch uint64)
- func (t *TestTrigger) SetTrigger(triggerHandler epochStart.TriggerHandler)
- func (t TestTrigger) Update(round uint64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEpochStartTrigger ¶
func NewEpochStartTrigger(args *ArgsNewMetaEpochStartTrigger) (*trigger, error)
NewEpochStartTrigger creates a trigger for start of epoch
func NewPendingMiniBlocks ¶ added in v1.0.67
func NewPendingMiniBlocks(args *ArgsPendingMiniBlocks) (*pendingMiniBlockHeaders, error)
NewPendingMiniBlocks will create a new pendingMiniBlockHeaders object
Types ¶
type ArgsNewMetaEpochStartTrigger ¶
type ArgsNewMetaEpochStartTrigger struct { GenesisTime time.Time Settings *config.EpochStartConfig Epoch uint32 EpochStartRound uint64 EpochStartNotifier epochStart.StartOfEpochNotifier Marshalizer marshal.Marshalizer Storage dataRetriever.StorageService }
ArgsNewMetaEpochStartTrigger defines struct needed to create a new start of epoch trigger
type ArgsPendingMiniBlocks ¶ added in v1.0.67
type ArgsPendingMiniBlocks struct { Marshalizer marshal.Marshalizer Storage storage.Storer MetaBlockStorage storage.Storer MetaBlockPool storage.Cacher }
ArgsPendingMiniBlocks is structure that contain components that are used to create a new pendingMiniBlockHeaders object
type TestTrigger ¶
type TestTrigger struct {
// contains filtered or unexported fields
}
TestTrigger extends start of epoch trigger and is used in integration tests as it exposes some functions that are not supposed to be used in production code Exported functions simplify the reproduction of edge cases
func (TestTrigger) EpochFinalityAttestingRound ¶
func (t TestTrigger) EpochFinalityAttestingRound() uint64
EpochFinalityAttestingRound returns the round when epoch start block was finalized
func (TestTrigger) EpochStartMetaHdrHash ¶
func (t TestTrigger) EpochStartMetaHdrHash() []byte
EpochStartMetaHdrHash returns the announcing meta header hash which created the new epoch
func (TestTrigger) EpochStartRound ¶
func (t TestTrigger) EpochStartRound() uint64
EpochStartRound returns the start round of the current epoch
func (TestTrigger) ForceEpochStart ¶
ForceEpochStart sets the conditions for start of epoch to true in case of edge cases
func (*TestTrigger) GetRoundsPerEpoch ¶
func (t *TestTrigger) GetRoundsPerEpoch() uint64
GetRoundsPerEpoch gets the number of rounds per epoch
func (TestTrigger) IsEpochStart ¶
func (t TestTrigger) IsEpochStart() bool
IsEpochStart return true if conditions are fulfilled for start of epoch
func (TestTrigger) IsInterfaceNil ¶
func (t TestTrigger) IsInterfaceNil() bool
IsInterfaceNil return true if underlying object is nil
func (TestTrigger) ReceivedHeader ¶ added in v1.0.67
func (t TestTrigger) ReceivedHeader(_ data.HeaderHandler)
ReceivedHeader saved the header into pool to verify if end-of-epoch conditions are fulfilled
func (TestTrigger) Revert ¶ added in v1.0.67
func (t TestTrigger) Revert()
Revert sets the start of epoch back to true
func (TestTrigger) SetCurrentEpochStartRound ¶
func (t TestTrigger) SetCurrentEpochStartRound(round uint64)
SetLastEpochStartRound sets the round when the current epoch started
func (TestTrigger) SetEpochStartMetaHdrHash ¶
func (t TestTrigger) SetEpochStartMetaHdrHash(metaHdrHash []byte)
SetEpochStartMetaHdrHash sets the epoch start meta header hase
func (TestTrigger) SetFinalityAttestingRound ¶
func (t TestTrigger) SetFinalityAttestingRound(round uint64)
SetFinalityAttestingRound sets the round which finalized the start of epoch block
func (TestTrigger) SetProcessed ¶
func (t TestTrigger) SetProcessed(header data.HeaderHandler)
SetProcessed sets start of epoch to false and cleans underlying structure
func (*TestTrigger) SetRoundsPerEpoch ¶
func (t *TestTrigger) SetRoundsPerEpoch(roundsPerEpoch uint64)
SetRoundsPerEpoch sets the number of round between epochs
func (*TestTrigger) SetTrigger ¶
func (t *TestTrigger) SetTrigger(triggerHandler epochStart.TriggerHandler)
SetTrigger sets the start of epoch trigger