Documentation
¶
Index ¶
- type PendingBlocks
- func (b *PendingBlocks) Add(block flow.Slashable[*flow.Proposal]) bool
- func (b *PendingBlocks) ByID(blockID flow.Identifier) (flow.Slashable[*flow.Proposal], bool)
- func (b *PendingBlocks) ByParentID(parentID flow.Identifier) ([]flow.Slashable[*flow.Proposal], bool)
- func (b *PendingBlocks) DropForParent(parentID flow.Identifier)
- func (b *PendingBlocks) PruneByView(view uint64)
- func (b *PendingBlocks) Size() uint
- type PendingClusterBlocks
- func (b *PendingClusterBlocks) Add(block flow.Slashable[*cluster.Proposal]) bool
- func (b *PendingClusterBlocks) ByID(blockID flow.Identifier) (flow.Slashable[*cluster.Proposal], bool)
- func (b *PendingClusterBlocks) ByParentID(parentID flow.Identifier) ([]flow.Slashable[*cluster.Proposal], bool)
- func (b *PendingClusterBlocks) DropForParent(parentID flow.Identifier)
- func (b *PendingClusterBlocks) PruneByView(view uint64)
- func (b *PendingClusterBlocks) Size() uint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PendingBlocks ¶
type PendingBlocks struct {
// contains filtered or unexported fields
}
PendingBlocks is a mempool for holding blocks. Furthermore, given a block ID, we can query all children that are currently stored in the mempool. The mempool's backend is intended to work generically for consensus blocks as well as cluster blocks.
func NewPendingBlocks ¶
func NewPendingBlocks() *PendingBlocks
func (*PendingBlocks) ByID ¶
func (b *PendingBlocks) ByID(blockID flow.Identifier) (flow.Slashable[*flow.Proposal], bool)
func (*PendingBlocks) ByParentID ¶
func (b *PendingBlocks) ByParentID(parentID flow.Identifier) ([]flow.Slashable[*flow.Proposal], bool)
func (*PendingBlocks) DropForParent ¶
func (b *PendingBlocks) DropForParent(parentID flow.Identifier)
func (*PendingBlocks) PruneByView ¶ added in v0.25.0
func (b *PendingBlocks) PruneByView(view uint64)
PruneByView prunes any pending blocks with views less or equal to the given view.
func (*PendingBlocks) Size ¶
func (b *PendingBlocks) Size() uint
type PendingClusterBlocks ¶
type PendingClusterBlocks struct {
// contains filtered or unexported fields
}
func NewPendingClusterBlocks ¶
func NewPendingClusterBlocks() *PendingClusterBlocks
func (*PendingClusterBlocks) ByID ¶
func (b *PendingClusterBlocks) ByID(blockID flow.Identifier) (flow.Slashable[*cluster.Proposal], bool)
func (*PendingClusterBlocks) ByParentID ¶
func (b *PendingClusterBlocks) ByParentID(parentID flow.Identifier) ([]flow.Slashable[*cluster.Proposal], bool)
func (*PendingClusterBlocks) DropForParent ¶
func (b *PendingClusterBlocks) DropForParent(parentID flow.Identifier)
func (*PendingClusterBlocks) PruneByView ¶ added in v0.25.0
func (b *PendingClusterBlocks) PruneByView(view uint64)
PruneByView prunes any pending cluster blocks with views less or equal to the given view.
func (*PendingClusterBlocks) Size ¶
func (b *PendingClusterBlocks) Size() uint
Click to show internal directories.
Click to hide internal directories.