Versions in this module Expand all Collapse all v2 v2.0.1 Oct 5, 2021 Changes in this version + type MockStateManager struct + StatesByRoot map[[32]byte]state.BeaconState + StatesBySlot map[types.Slot]state.BeaconState + func NewMockService() *MockStateManager + func (m *MockStateManager) AddStateForRoot(state state.BeaconState, blockRoot [32]byte) + func (m *MockStateManager) AddStateForSlot(state state.BeaconState, slot types.Slot) + func (m *MockStateManager) DisableSaveHotStateToDB(_ context.Context) error + func (m *MockStateManager) EnableSaveHotStateToDB(_ context.Context) + func (m *MockStateManager) ForceCheckpoint(_ context.Context, _ []byte) error + func (m *MockStateManager) HasState(_ context.Context, _ [32]byte) (bool, error) + func (m *MockStateManager) HasStateInCache(_ context.Context, _ [32]byte) (bool, error) + func (m *MockStateManager) LoadBlocks(_ context.Context, _, _ types.Slot, _ [32]byte) ([]block.SignedBeaconBlock, error) + func (m *MockStateManager) MigrateToCold(_ context.Context, _ [32]byte) error + func (m *MockStateManager) RecoverStateSummary(_ context.Context, _ [32]byte) (*ethpb.StateSummary, error) + func (m *MockStateManager) ReplayBlocks(_ context.Context, _ state.BeaconState, _ []block.SignedBeaconBlock, ...) (state.BeaconState, error) + func (m *MockStateManager) Resume(_ context.Context) (state.BeaconState, error) + func (m *MockStateManager) SaveFinalizedState(_ types.Slot, _ [32]byte, _ state.BeaconState) + func (m *MockStateManager) SaveState(_ context.Context, _ [32]byte, _ state.BeaconState) error + func (m *MockStateManager) StateByRoot(_ context.Context, blockRoot [32]byte) (state.BeaconState, error) + func (m *MockStateManager) StateByRootInitialSync(_ context.Context, _ [32]byte) (state.BeaconState, error) + func (m *MockStateManager) StateBySlot(_ context.Context, slot types.Slot) (state.BeaconState, error) + type State struct + func New(beaconDB db.NoHeadAccessDatabase) *State + func (s *State) DisableSaveHotStateToDB(ctx context.Context) error + func (s *State) EnableSaveHotStateToDB(_ context.Context) + func (s *State) ForceCheckpoint(ctx context.Context, root []byte) error + func (s *State) HasState(ctx context.Context, blockRoot [32]byte) (bool, error) + func (s *State) HasStateInCache(ctx context.Context, blockRoot [32]byte) (bool, error) + func (s *State) LoadBlocks(ctx context.Context, startSlot, endSlot types.Slot, endBlockRoot [32]byte) ([]block.SignedBeaconBlock, error) + func (s *State) MigrateToCold(ctx context.Context, fRoot [32]byte) error + func (s *State) RecoverStateSummary(ctx context.Context, blockRoot [32]byte) (*ethpb.StateSummary, error) + func (s *State) ReplayBlocks(ctx context.Context, state state.BeaconState, signed []block.SignedBeaconBlock, ...) (state.BeaconState, error) + func (s *State) Resume(ctx context.Context) (state.BeaconState, error) + func (s *State) SaveFinalizedState(fSlot types.Slot, fRoot [32]byte, fState state.BeaconState) + func (s *State) SaveState(ctx context.Context, root [32]byte, st state.BeaconState) error + func (s *State) StateByRoot(ctx context.Context, blockRoot [32]byte) (state.BeaconState, error) + func (s *State) StateByRootInitialSync(ctx context.Context, blockRoot [32]byte) (state.BeaconState, error) + func (s *State) StateBySlot(ctx context.Context, slot types.Slot) (state.BeaconState, error) + type StateManager interface + DisableSaveHotStateToDB func(ctx context.Context) error + EnableSaveHotStateToDB func(_ context.Context) + ForceCheckpoint func(ctx context.Context, root []byte) error + HasState func(ctx context.Context, blockRoot [32]byte) (bool, error) + HasStateInCache func(ctx context.Context, blockRoot [32]byte) (bool, error) + LoadBlocks func(ctx context.Context, startSlot, endSlot types.Slot, endBlockRoot [32]byte) ([]block.SignedBeaconBlock, error) + MigrateToCold func(ctx context.Context, fRoot [32]byte) error + RecoverStateSummary func(ctx context.Context, blockRoot [32]byte) (*ethpb.StateSummary, error) + ReplayBlocks func(ctx context.Context, state state.BeaconState, signed []block.SignedBeaconBlock, ...) (state.BeaconState, error) + Resume func(ctx context.Context) (state.BeaconState, error) + SaveFinalizedState func(fSlot types.Slot, fRoot [32]byte, fState state.BeaconState) + SaveState func(ctx context.Context, root [32]byte, st state.BeaconState) error + StateByRoot func(ctx context.Context, blockRoot [32]byte) (state.BeaconState, error) + StateByRootInitialSync func(ctx context.Context, blockRoot [32]byte) (state.BeaconState, error) + StateBySlot func(ctx context.Context, slot types.Slot) (state.BeaconState, error) Other modules containing this package github.com/prysmaticlabs/prysm github.com/prysmaticlabs/prysm/v3 github.com/prysmaticlabs/prysm/v4 github.com/prysmaticlabs/prysm/v5