Documentation ¶
Index ¶
- func Warmup(db sql.Executor, cache *Data) error
- type ATX
- type Data
- func (d *Data) Add(epoch types.EpochID, node types.NodeID, atx types.ATXID, ...)
- func (d *Data) Evicted() types.EpochID
- func (d *Data) Get(epoch types.EpochID, atx types.ATXID) *ATX
- func (d *Data) IsEvicted(epoch types.EpochID) bool
- func (d *Data) OnEpoch(applied types.EpochID)
- func (d *Data) SetMalicious(node types.NodeID)
- func (d *Data) WeightForSet(epoch types.EpochID, set []types.ATXID) (uint64, []bool)
- type Opt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Data ¶
type Data struct {
// contains filtered or unexported fields
}
func (*Data) OnEpoch ¶
OnEpoch is a notification for cache to evict epochs that are not useful to keep in memory.
func (*Data) SetMalicious ¶
type Opt ¶
type Opt func(*Data)
func WithCapacity ¶
WithCapacity sets the number of epochs from the latest applied that cache will maintain in memory.
func WithCapacityFromLayers ¶
WithCapacityFromLayers sets capacity to include all layers in the window.
Click to show internal directories.
Click to hide internal directories.