Documentation ¶
Index ¶
- type MockCanonicalChecker
- type MockCurrentSlotter
- type MockReplayer
- type MockReplayerBuilder
- func (b *MockReplayerBuilder) ReplayerForSlot(target primitives.Slot) stategen.Replayer
- func (b *MockReplayerBuilder) SetMockSlotError(s primitives.Slot, e error)
- func (b *MockReplayerBuilder) SetMockState(s state.BeaconState)
- func (b *MockReplayerBuilder) SetMockStateForSlot(s state.BeaconState, slot primitives.Slot)
- type MockReplayerBuilderOption
- type MockStateManager
- func (m *MockStateManager) AddStateForRoot(state state.BeaconState, blockRoot [32]byte)
- func (m *MockStateManager) AddStateForSlot(state state.BeaconState, slot primitives.Slot)
- func (*MockStateManager) BalancesByRoot(_ context.Context, _ [32]byte) ([]uint64, error)
- func (m *MockStateManager) DeleteStateFromCaches(context.Context, [32]byte) error
- func (_ *MockStateManager) DisableSaveHotStateToDB(_ context.Context) error
- func (_ *MockStateManager) EnableSaveHotStateToDB(_ context.Context)
- func (_ *MockStateManager) ForceCheckpoint(_ context.Context, _ []byte) error
- func (_ *MockStateManager) HasState(_ context.Context, _ [32]byte) (bool, error)
- func (_ *MockStateManager) MigrateToCold(_ context.Context, _ [32]byte) error
- func (_ *MockStateManager) Resume(_ context.Context, _ state.BeaconState) (state.BeaconState, error)
- func (_ *MockStateManager) SaveFinalizedState(_ primitives.Slot, _ [32]byte, _ state.BeaconState)
- func (_ *MockStateManager) SaveState(_ context.Context, _ [32]byte, _ state.BeaconState) error
- func (m *MockStateManager) StateByRoot(_ context.Context, blockRoot [32]byte) (state.BeaconState, error)
- func (_ *MockStateManager) StateByRootIfCachedNoCopy(_ [32]byte) state.BeaconState
- func (_ *MockStateManager) StateByRootInitialSync(_ context.Context, _ [32]byte) (state.BeaconState, error)
- func (m *MockStateManager) 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 MockCanonicalChecker ¶
func (*MockCanonicalChecker) IsCanonical ¶
type MockCurrentSlotter ¶
type MockCurrentSlotter struct {
Slot primitives.Slot
}
func (*MockCurrentSlotter) CurrentSlot ¶
func (c *MockCurrentSlotter) CurrentSlot() primitives.Slot
type MockReplayer ¶
type MockReplayer struct { State state.BeaconState Err error }
func (*MockReplayer) ReplayBlocks ¶
func (m *MockReplayer) ReplayBlocks(_ context.Context) (state.BeaconState, error)
func (*MockReplayer) ReplayToSlot ¶
func (m *MockReplayer) ReplayToSlot(_ context.Context, _ primitives.Slot) (state.BeaconState, error)
type MockReplayerBuilder ¶
type MockReplayerBuilder struct {
// contains filtered or unexported fields
}
func NewMockReplayerBuilder ¶
func NewMockReplayerBuilder(opt ...MockReplayerBuilderOption) *MockReplayerBuilder
func (*MockReplayerBuilder) ReplayerForSlot ¶
func (b *MockReplayerBuilder) ReplayerForSlot(target primitives.Slot) stategen.Replayer
func (*MockReplayerBuilder) SetMockSlotError ¶
func (b *MockReplayerBuilder) SetMockSlotError(s primitives.Slot, e error)
func (*MockReplayerBuilder) SetMockState ¶
func (b *MockReplayerBuilder) SetMockState(s state.BeaconState)
func (*MockReplayerBuilder) SetMockStateForSlot ¶
func (b *MockReplayerBuilder) SetMockStateForSlot(s state.BeaconState, slot primitives.Slot)
type MockReplayerBuilderOption ¶
type MockReplayerBuilderOption func(*MockReplayerBuilder)
func WithMockState ¶
func WithMockState(s state.BeaconState) MockReplayerBuilderOption
type MockStateManager ¶
type MockStateManager struct { StatesByRoot map[[32]byte]state.BeaconState StatesBySlot map[primitives.Slot]state.BeaconState }
MockStateManager is a fake implementation of StateManager.
func (*MockStateManager) AddStateForRoot ¶
func (m *MockStateManager) AddStateForRoot(state state.BeaconState, blockRoot [32]byte)
AddStateForRoot --
func (*MockStateManager) AddStateForSlot ¶
func (m *MockStateManager) AddStateForSlot(state state.BeaconState, slot primitives.Slot)
AddStateForSlot --
func (*MockStateManager) BalancesByRoot ¶ added in v3.1.2
BalancesByRoot --
func (*MockStateManager) DeleteStateFromCaches ¶
func (m *MockStateManager) DeleteStateFromCaches(context.Context, [32]byte) error
DeleteStateFromCaches --
func (*MockStateManager) DisableSaveHotStateToDB ¶
func (_ *MockStateManager) DisableSaveHotStateToDB(_ context.Context) error
DisableSaveHotStateToDB --
func (*MockStateManager) EnableSaveHotStateToDB ¶
func (_ *MockStateManager) EnableSaveHotStateToDB(_ context.Context)
EnableSaveHotStateToDB --
func (*MockStateManager) ForceCheckpoint ¶
func (_ *MockStateManager) ForceCheckpoint(_ context.Context, _ []byte) error
ForceCheckpoint --
func (*MockStateManager) MigrateToCold ¶
func (_ *MockStateManager) MigrateToCold(_ context.Context, _ [32]byte) error
MigrateToCold --
func (*MockStateManager) Resume ¶
func (_ *MockStateManager) Resume(_ context.Context, _ state.BeaconState) (state.BeaconState, error)
Resume --
func (*MockStateManager) SaveFinalizedState ¶
func (_ *MockStateManager) SaveFinalizedState(_ primitives.Slot, _ [32]byte, _ state.BeaconState)
SaveFinalizedState --
func (*MockStateManager) SaveState ¶
func (_ *MockStateManager) SaveState(_ context.Context, _ [32]byte, _ state.BeaconState) error
SaveState --
func (*MockStateManager) StateByRoot ¶
func (m *MockStateManager) StateByRoot(_ context.Context, blockRoot [32]byte) (state.BeaconState, error)
StateByRoot --
func (*MockStateManager) StateByRootIfCachedNoCopy ¶
func (_ *MockStateManager) StateByRootIfCachedNoCopy(_ [32]byte) state.BeaconState
StateByRootIfCachedNoCopy --
func (*MockStateManager) StateByRootInitialSync ¶
func (_ *MockStateManager) StateByRootInitialSync(_ context.Context, _ [32]byte) (state.BeaconState, error)
StateByRootInitialSync --
func (*MockStateManager) StateBySlot ¶
func (m *MockStateManager) StateBySlot(_ context.Context, slot primitives.Slot) (state.BeaconState, error)
StateBySlot --
Click to show internal directories.
Click to hide internal directories.