Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadOrFetchLatestBeaconState ¶
func ReadOrFetchLatestBeaconState(ctx context.Context, dirs datadir.Dirs, beaconCfg *clparams.BeaconChainConfig, caplinConfig clparams.CaplinConfig, genesisDB genesisdb.GenesisDB) (*state.CachingBeaconState, error)
ReadOrFetchLatestBeaconState reads the latest beacon state from disk or fetches it from the network.
Types ¶
type CheckpointSyncer ¶
type CheckpointSyncer interface {
GetLatestBeaconState(ctx context.Context) (*state.CachingBeaconState, error)
}
func NewLocalCheckpointSyncer ¶
func NewLocalCheckpointSyncer(genesisState *state.CachingBeaconState, dir afero.Fs) CheckpointSyncer
The local checkpoint syncer, loads a checkpoint from the local disk or uses the genesis state.
func NewRemoteCheckpointSync ¶
func NewRemoteCheckpointSync(beaconConfig *clparams.BeaconChainConfig, net clparams.NetworkType) CheckpointSyncer
type LocalCheckpointSyncer ¶
type LocalCheckpointSyncer struct {
// contains filtered or unexported fields
}
func (*LocalCheckpointSyncer) GetLatestBeaconState ¶
func (l *LocalCheckpointSyncer) GetLatestBeaconState(ctx context.Context) (*state.CachingBeaconState, error)
type RemoteCheckpointSync ¶
type RemoteCheckpointSync struct {
// contains filtered or unexported fields
}
RemoteCheckpointSync is a CheckpointSyncer that fetches the checkpoint state from a remote endpoint.
func (*RemoteCheckpointSync) GetLatestBeaconState ¶
func (r *RemoteCheckpointSync) GetLatestBeaconState(ctx context.Context) (*state.CachingBeaconState, error)
Click to show internal directories.
Click to hide internal directories.