Documentation ¶
Index ¶
- func NewProvider() module.Provider[*engine.Engine, retainer.BlockRetainer]
- type BlockRetainer
- func (r *BlockRetainer) BlockMetadata(blockID iotago.BlockID) (*api.BlockMetadataResponse, error)
- func (r *BlockRetainer) CommitSlot(committedSlot iotago.SlotIndex) error
- func (r *BlockRetainer) OnBlockAccepted(block *blocks.Block) error
- func (r *BlockRetainer) OnBlockBooked(block *blocks.Block) error
- func (r *BlockRetainer) OnBlockConfirmed(block *blocks.Block) error
- func (r *BlockRetainer) OnBlockDropped(block *blocks.Block) error
- func (r *BlockRetainer) Reset()
- func (r *BlockRetainer) UpdateBlockMetadata(blockID iotago.BlockID, state api.BlockState) error
- type FinalizedSlotFunc
- type StoreFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProvider ¶
NewProvider creates a new BlockRetainer provider.
Types ¶
type BlockRetainer ¶
func New ¶
func New(subModule module.Module, workersGroup *workerpool.Group, retainerStoreFunc StoreFunc, finalizedSlotFunc FinalizedSlotFunc, errorHandler func(error)) *BlockRetainer
func (*BlockRetainer) BlockMetadata ¶
func (r *BlockRetainer) BlockMetadata(blockID iotago.BlockID) (*api.BlockMetadataResponse, error)
func (*BlockRetainer) CommitSlot ¶
func (r *BlockRetainer) CommitSlot(committedSlot iotago.SlotIndex) error
func (*BlockRetainer) OnBlockAccepted ¶
func (r *BlockRetainer) OnBlockAccepted(block *blocks.Block) error
func (*BlockRetainer) OnBlockBooked ¶
func (r *BlockRetainer) OnBlockBooked(block *blocks.Block) error
OnBlockBooked triggers storing block in the retainer on block booked event.
func (*BlockRetainer) OnBlockConfirmed ¶
func (r *BlockRetainer) OnBlockConfirmed(block *blocks.Block) error
func (*BlockRetainer) OnBlockDropped ¶
func (r *BlockRetainer) OnBlockDropped(block *blocks.Block) error
func (*BlockRetainer) Reset ¶
func (r *BlockRetainer) Reset()
Reset resets the component to a clean state as if it was created at the last commitment.
func (*BlockRetainer) UpdateBlockMetadata ¶
func (r *BlockRetainer) UpdateBlockMetadata(blockID iotago.BlockID, state api.BlockState) error
type FinalizedSlotFunc ¶
Click to show internal directories.
Click to hide internal directories.