Documentation
¶
Index ¶
- type OrderedBlocks
- func (a *OrderedBlocks) Add(sig proto.BlockID) bool
- func (a *OrderedBlocks) Contains(sig proto.BlockID) bool
- func (a *OrderedBlocks) PopAll(isLightNode bool) ([]*proto.Block, []*proto.BlockSnapshot)
- func (a *OrderedBlocks) ReceivedCount(isLightNode bool) int
- func (a *OrderedBlocks) RequestedCount() int
- func (a *OrderedBlocks) SetBlock(b *proto.Block)
- func (a *OrderedBlocks) SetSnapshot(blockID proto.BlockID, snapshot *proto.BlockSnapshot)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrderedBlocks ¶
type OrderedBlocks struct {
// contains filtered or unexported fields
}
func NewOrderedBlocks ¶
func NewOrderedBlocks() *OrderedBlocks
func (*OrderedBlocks) Add ¶
func (a *OrderedBlocks) Add(sig proto.BlockID) bool
true - added, false - not added
func (*OrderedBlocks) PopAll ¶
func (a *OrderedBlocks) PopAll(isLightNode bool) ([]*proto.Block, []*proto.BlockSnapshot)
func (*OrderedBlocks) ReceivedCount ¶ added in v0.8.0
func (a *OrderedBlocks) ReceivedCount(isLightNode bool) int
blocks count available for pop
func (*OrderedBlocks) RequestedCount ¶ added in v0.8.0
func (a *OrderedBlocks) RequestedCount() int
func (*OrderedBlocks) SetBlock ¶
func (a *OrderedBlocks) SetBlock(b *proto.Block)
func (*OrderedBlocks) SetSnapshot ¶ added in v0.11.0
func (a *OrderedBlocks) SetSnapshot(blockID proto.BlockID, snapshot *proto.BlockSnapshot)
Click to show internal directories.
Click to hide internal directories.