Documentation ¶
Index ¶
- Constants
- Variables
- type BeaconCache
- func (b *BeaconCache) AddCheckPoint(finalizedHeaderRoot common.Hash, blockRootsTree *ssz.Node, slot uint64)
- func (b *BeaconCache) AddCheckPointSlots(slots []uint64)
- func (b *BeaconCache) GetClosestCheckpoint(slot uint64) (Proof, error)
- func (b *BeaconCache) LastFinalizedHeader() common.Hash
- func (b *BeaconCache) SetLastSyncedSyncCommitteePeriod(period uint64)
- type CheckPoints
- type Finalized
- type Proof
Constants ¶
View Source
const FinalizedCheckpointsLimit = 50
Variables ¶
View Source
var ( FinalizedCheckPointNotAvailable = errors.New("finalized checkpoint for block roots proof not available in cache") FinalizedCheckPointNotPopulated = errors.New("finalized checkpoint for slot not populated in cache yet") )
Functions ¶
This section is empty.
Types ¶
type BeaconCache ¶
type BeaconCache struct { LastSyncedSyncCommitteePeriod uint64 Finalized Finalized // contains filtered or unexported fields }
func New ¶
func New(slotsInEpoch, epochsPerSyncCommitteePeriod uint64) *BeaconCache
func (*BeaconCache) AddCheckPoint ¶
func (*BeaconCache) AddCheckPointSlots ¶
func (b *BeaconCache) AddCheckPointSlots(slots []uint64)
func (*BeaconCache) GetClosestCheckpoint ¶
func (b *BeaconCache) GetClosestCheckpoint(slot uint64) (Proof, error)
func (*BeaconCache) LastFinalizedHeader ¶
func (b *BeaconCache) LastFinalizedHeader() common.Hash
func (*BeaconCache) SetLastSyncedSyncCommitteePeriod ¶
func (b *BeaconCache) SetLastSyncedSyncCommitteePeriod(period uint64)
type CheckPoints ¶
type Finalized ¶
type Finalized struct { // Stores the last successfully imported hash LastSyncedHash common.Hash // Stores the last successfully synced slot LastSyncedSlot uint64 // Stores the last attempted finalized header, whether the import succeeded or not. LastAttemptedSyncHash common.Hash // Stores the slot number of the above header LastAttemptedSyncSlot uint64 // Stores finalized checkpoints Checkpoints CheckPoints }
Click to show internal directories.
Click to hide internal directories.