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(blockID iotago.BlockID) error
- func (r *BlockRetainer) OnBlockBooked(block *blocks.Block) error
- func (r *BlockRetainer) OnBlockConfirmed(blockID iotago.BlockID) error
- func (r *BlockRetainer) OnBlockDropped(blockID iotago.BlockID) error
- func (r *BlockRetainer) Reset()
- func (r *BlockRetainer) Shutdown()
- 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(module 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(blockID iotago.BlockID) 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(blockID iotago.BlockID) error
func (*BlockRetainer) OnBlockDropped ¶
func (r *BlockRetainer) OnBlockDropped(blockID iotago.BlockID) 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) Shutdown ¶
func (r *BlockRetainer) Shutdown()
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.