Documentation ¶
Index ¶
- type CanonicalChecker
- type CurrentSlotter
- type Replayer
- type ReplayerBuilder
- func (b *ReplayerBuilder) ReplayerForSlot(target primitives.Slot) stategen.Replayer
- func (b *ReplayerBuilder) SetMockSlotError(s primitives.Slot, e error)
- func (b *ReplayerBuilder) SetMockState(s state.BeaconState)
- func (b *ReplayerBuilder) SetMockStateForSlot(s state.BeaconState, slot primitives.Slot)
- type ReplayerBuilderOption
- type StateManager
- func (*StateManager) ActiveNonSlashedBalancesByRoot(_ context.Context, _ [32]byte) ([]uint64, error)
- func (m *StateManager) AddStateForRoot(state state.BeaconState, blockRoot [32]byte)
- func (m *StateManager) AddStateForSlot(state state.BeaconState, slot primitives.Slot)
- func (m *StateManager) DeleteStateFromCaches(context.Context, [32]byte) error
- func (_ *StateManager) DisableSaveHotStateToDB(_ context.Context) error
- func (_ *StateManager) EnableSaveHotStateToDB(_ context.Context)
- func (_ *StateManager) ForceCheckpoint(_ context.Context, _ []byte) error
- func (_ *StateManager) HasState(_ context.Context, _ [32]byte) (bool, error)
- func (_ *StateManager) MigrateToCold(_ context.Context, _ [32]byte) error
- func (_ *StateManager) Resume(_ context.Context, _ state.BeaconState) (state.BeaconState, error)
- func (_ *StateManager) SaveFinalizedState(_ primitives.Slot, _ [32]byte, _ state.BeaconState)
- func (_ *StateManager) SaveState(_ context.Context, _ [32]byte, _ state.BeaconState) error
- func (m *StateManager) StateByRoot(_ context.Context, blockRoot [32]byte) (state.BeaconState, error)
- func (_ *StateManager) StateByRootIfCachedNoCopy(_ [32]byte) state.BeaconState
- func (_ *StateManager) StateByRootInitialSync(_ context.Context, _ [32]byte) (state.BeaconState, error)
- func (m *StateManager) StateBySlot(_ context.Context, slot primitives.Slot) (state.BeaconState, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CanonicalChecker ¶
func (*CanonicalChecker) IsCanonical ¶
type CurrentSlotter ¶
type CurrentSlotter struct {
Slot primitives.Slot
}
func (*CurrentSlotter) CurrentSlot ¶
func (c *CurrentSlotter) CurrentSlot() primitives.Slot
type Replayer ¶
type Replayer struct { State state.BeaconState Err error }
func (*Replayer) ReplayBlocks ¶
func (*Replayer) ReplayToSlot ¶
func (m *Replayer) ReplayToSlot(_ context.Context, _ primitives.Slot) (state.BeaconState, error)
type ReplayerBuilder ¶
type ReplayerBuilder struct {
// contains filtered or unexported fields
}
func NewReplayerBuilder ¶
func NewReplayerBuilder(opt ...ReplayerBuilderOption) *ReplayerBuilder
func (*ReplayerBuilder) ReplayerForSlot ¶
func (b *ReplayerBuilder) ReplayerForSlot(target primitives.Slot) stategen.Replayer
func (*ReplayerBuilder) SetMockSlotError ¶
func (b *ReplayerBuilder) SetMockSlotError(s primitives.Slot, e error)
func (*ReplayerBuilder) SetMockState ¶
func (b *ReplayerBuilder) SetMockState(s state.BeaconState)
func (*ReplayerBuilder) SetMockStateForSlot ¶
func (b *ReplayerBuilder) SetMockStateForSlot(s state.BeaconState, slot primitives.Slot)
type ReplayerBuilderOption ¶
type ReplayerBuilderOption func(*ReplayerBuilder)
func WithMockState ¶
func WithMockState(s state.BeaconState) ReplayerBuilderOption
type StateManager ¶
type StateManager struct { StatesByRoot map[[32]byte]state.BeaconState StatesBySlot map[primitives.Slot]state.BeaconState }
StateManager is a fake implementation of StateManager.
func (*StateManager) ActiveNonSlashedBalancesByRoot ¶
func (*StateManager) ActiveNonSlashedBalancesByRoot(_ context.Context, _ [32]byte) ([]uint64, error)
ActiveNonSlashedBalancesByRoot --
func (*StateManager) AddStateForRoot ¶
func (m *StateManager) AddStateForRoot(state state.BeaconState, blockRoot [32]byte)
AddStateForRoot --
func (*StateManager) AddStateForSlot ¶
func (m *StateManager) AddStateForSlot(state state.BeaconState, slot primitives.Slot)
AddStateForSlot --
func (*StateManager) DeleteStateFromCaches ¶
func (m *StateManager) DeleteStateFromCaches(context.Context, [32]byte) error
DeleteStateFromCaches --
func (*StateManager) DisableSaveHotStateToDB ¶
func (_ *StateManager) DisableSaveHotStateToDB(_ context.Context) error
DisableSaveHotStateToDB --
func (*StateManager) EnableSaveHotStateToDB ¶
func (_ *StateManager) EnableSaveHotStateToDB(_ context.Context)
EnableSaveHotStateToDB --
func (*StateManager) ForceCheckpoint ¶
func (_ *StateManager) ForceCheckpoint(_ context.Context, _ []byte) error
ForceCheckpoint --
func (*StateManager) MigrateToCold ¶
func (_ *StateManager) MigrateToCold(_ context.Context, _ [32]byte) error
MigrateToCold --
func (*StateManager) Resume ¶
func (_ *StateManager) Resume(_ context.Context, _ state.BeaconState) (state.BeaconState, error)
Resume --
func (*StateManager) SaveFinalizedState ¶
func (_ *StateManager) SaveFinalizedState(_ primitives.Slot, _ [32]byte, _ state.BeaconState)
SaveFinalizedState --
func (*StateManager) SaveState ¶
func (_ *StateManager) SaveState(_ context.Context, _ [32]byte, _ state.BeaconState) error
SaveState --
func (*StateManager) StateByRoot ¶
func (m *StateManager) StateByRoot(_ context.Context, blockRoot [32]byte) (state.BeaconState, error)
StateByRoot --
func (*StateManager) StateByRootIfCachedNoCopy ¶
func (_ *StateManager) StateByRootIfCachedNoCopy(_ [32]byte) state.BeaconState
StateByRootIfCachedNoCopy --
func (*StateManager) StateByRootInitialSync ¶
func (_ *StateManager) StateByRootInitialSync(_ context.Context, _ [32]byte) (state.BeaconState, error)
StateByRootInitialSync --
func (*StateManager) StateBySlot ¶
func (m *StateManager) StateBySlot(_ context.Context, slot primitives.Slot) (state.BeaconState, error)
StateBySlot --
Click to show internal directories.
Click to hide internal directories.