Documentation
¶
Index ¶
- Variables
- func EmptyCancel()
- type CancelFn
- type SyncedData
- type SyncedDataManager
- func (s *SyncedDataManager) CommitteeCount(epoch uint64) uint64
- func (s *SyncedDataManager) HeadRoot() common.Hash
- func (s *SyncedDataManager) HeadSlot() uint64
- func (s *SyncedDataManager) HistoricalRootElementAtIndex(index int) (common.Hash, error)
- func (s *SyncedDataManager) HistoricalSummaryElementAtIndex(index int) (*cltypes.HistoricalSummary, error)
- func (s *SyncedDataManager) OnHeadState(newState *state.CachingBeaconState) (err error)
- func (s *SyncedDataManager) Syncing() bool
- func (s *SyncedDataManager) UnsetHeadState()
- func (s *SyncedDataManager) ValidatorIndexByPublicKey(pubkey common.Bytes48) (uint64, bool, error)
- func (s *SyncedDataManager) ValidatorPublicKeyByIndex(index int) (common.Bytes48, error)
- func (s *SyncedDataManager) ViewHeadState(fn ViewHeadStateFn) error
- func (s *SyncedDataManager) ViewPreviousHeadState(fn ViewHeadStateFn) error
- type ViewHeadStateFn
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotSynced = errors.New("not synced") ErrPreviousStateNotAvailable = errors.New("previous state not available") )
Functions ¶
func EmptyCancel ¶
func EmptyCancel()
Types ¶
type SyncedData ¶
type SyncedData interface { OnHeadState(newState *state.CachingBeaconState) error UnsetHeadState() ViewHeadState(fn ViewHeadStateFn) error ViewPreviousHeadState(fn ViewHeadStateFn) error Syncing() bool HeadSlot() uint64 HeadRoot() common.Hash CommitteeCount(epoch uint64) uint64 ValidatorPublicKeyByIndex(index int) (common.Bytes48, error) ValidatorIndexByPublicKey(pubkey common.Bytes48) (uint64, bool, error) HistoricalRootElementAtIndex(index int) (common.Hash, error) HistoricalSummaryElementAtIndex(index int) (*cltypes.HistoricalSummary, error) }
type SyncedDataManager ¶
type SyncedDataManager struct {
// contains filtered or unexported fields
}
func NewSyncedDataManager ¶
func NewSyncedDataManager(cfg *clparams.BeaconChainConfig, enabled bool) *SyncedDataManager
func (*SyncedDataManager) CommitteeCount ¶
func (s *SyncedDataManager) CommitteeCount(epoch uint64) uint64
func (*SyncedDataManager) HeadRoot ¶
func (s *SyncedDataManager) HeadRoot() common.Hash
func (*SyncedDataManager) HeadSlot ¶
func (s *SyncedDataManager) HeadSlot() uint64
func (*SyncedDataManager) HistoricalRootElementAtIndex ¶
func (s *SyncedDataManager) HistoricalRootElementAtIndex(index int) (common.Hash, error)
func (*SyncedDataManager) HistoricalSummaryElementAtIndex ¶
func (s *SyncedDataManager) HistoricalSummaryElementAtIndex(index int) (*cltypes.HistoricalSummary, error)
func (*SyncedDataManager) OnHeadState ¶
func (s *SyncedDataManager) OnHeadState(newState *state.CachingBeaconState) (err error)
OnHeadState updates the current head state and tracks the previous state.
func (*SyncedDataManager) Syncing ¶
func (s *SyncedDataManager) Syncing() bool
func (*SyncedDataManager) UnsetHeadState ¶
func (s *SyncedDataManager) UnsetHeadState()
func (*SyncedDataManager) ValidatorIndexByPublicKey ¶
func (*SyncedDataManager) ValidatorPublicKeyByIndex ¶
func (s *SyncedDataManager) ValidatorPublicKeyByIndex(index int) (common.Bytes48, error)
func (*SyncedDataManager) ViewHeadState ¶
func (s *SyncedDataManager) ViewHeadState(fn ViewHeadStateFn) error
ViewHeadState allows safe, read-only access to the current head state.
func (*SyncedDataManager) ViewPreviousHeadState ¶
func (s *SyncedDataManager) ViewPreviousHeadState(fn ViewHeadStateFn) error
ViewPreviousHeadState allows safe, read-only access to the previous head state.
type ViewHeadStateFn ¶
type ViewHeadStateFn func(headState *state.CachingBeaconState) error
Directories
¶
Path | Synopsis |
---|---|
Package mock_services is a generated GoMock package.
|
Package mock_services is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.