Documentation
¶
Index ¶
- type BeaconMockManager
- func (m *BeaconMockManager) AddValidator(pubkey beacon.ValidatorPubkey, withdrawalCredentials common.Hash) (*db.Validator, error)
- func (m *BeaconMockManager) Beacon_Attestations(ctx context.Context, blockId string) (client.AttestationsResponse, bool, error)
- func (m *BeaconMockManager) Beacon_Block(ctx context.Context, blockId string) (client.BeaconBlockResponse, bool, error)
- func (m *BeaconMockManager) Beacon_BlsToExecutionChanges_Post(ctx context.Context, request client.BLSToExecutionChangeRequest) error
- func (m *BeaconMockManager) Beacon_Committees(ctx context.Context, stateId string, epoch *uint64) (client.CommitteesResponse, error)
- func (m *BeaconMockManager) Beacon_FinalityCheckpoints(ctx context.Context, stateId string) (client.FinalityCheckpointsResponse, error)
- func (m *BeaconMockManager) Beacon_Genesis(ctx context.Context) (client.GenesisResponse, error)
- func (m *BeaconMockManager) Beacon_Header(ctx context.Context, blockId string) (client.BeaconBlockHeaderResponse, bool, error)
- func (m *BeaconMockManager) Beacon_Validators(ctx context.Context, stateId string, ids []string) (client.ValidatorsResponse, error)
- func (m *BeaconMockManager) Beacon_VoluntaryExits_Post(ctx context.Context, request client.VoluntaryExitRequest) error
- func (m *BeaconMockManager) Config_DepositContract(ctx context.Context) (client.Eth2DepositContractResponse, error)
- func (m *BeaconMockManager) Config_Spec(ctx context.Context) (client.Eth2ConfigResponse, error)
- func (m *BeaconMockManager) GetConfig() *db.Config
- func (m *BeaconMockManager) GetCurrentSlot() uint64
- func (m *BeaconMockManager) GetHighestSlot() uint64
- func (m *BeaconMockManager) GetValidator(id string) (*db.Validator, error)
- func (m *BeaconMockManager) GetValidators(ids []string) ([]*db.Validator, error)
- func (m *BeaconMockManager) IncrementSlot()
- func (m *BeaconMockManager) Node_Syncing(ctx context.Context) (client.SyncStatusResponse, error)
- func (m *BeaconMockManager) RevertToSnapshot(name string) error
- func (m *BeaconMockManager) SetCurrentSlot(slot uint64)
- func (m *BeaconMockManager) SetDatabase(db *db.Database)
- func (m *BeaconMockManager) TakeSnapshot(name string)
- func (m *BeaconMockManager) Validator_DutiesProposer(ctx context.Context, indices []string, epoch uint64) (client.ProposerDutiesResponse, error)
- func (m *BeaconMockManager) Validator_DutiesSync_Post(ctx context.Context, indices []string, epoch uint64) (client.SyncDutiesResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BeaconMockManager ¶
type BeaconMockManager struct {
// contains filtered or unexported fields
}
Beacon mock manager
func NewBeaconMockManager ¶
func NewBeaconMockManager(logger *slog.Logger, config *db.Config) *BeaconMockManager
Create a new beacon mock manager instance
func (*BeaconMockManager) AddValidator ¶
func (m *BeaconMockManager) AddValidator(pubkey beacon.ValidatorPubkey, withdrawalCredentials common.Hash) (*db.Validator, error)
Add a validator to the Beacon chain
func (*BeaconMockManager) Beacon_Attestations ¶
func (m *BeaconMockManager) Beacon_Attestations(ctx context.Context, blockId string) (client.AttestationsResponse, bool, error)
func (*BeaconMockManager) Beacon_Block ¶
func (m *BeaconMockManager) Beacon_Block(ctx context.Context, blockId string) (client.BeaconBlockResponse, bool, error)
func (*BeaconMockManager) Beacon_BlsToExecutionChanges_Post ¶
func (m *BeaconMockManager) Beacon_BlsToExecutionChanges_Post(ctx context.Context, request client.BLSToExecutionChangeRequest) error
func (*BeaconMockManager) Beacon_Committees ¶
func (m *BeaconMockManager) Beacon_Committees(ctx context.Context, stateId string, epoch *uint64) (client.CommitteesResponse, error)
func (*BeaconMockManager) Beacon_FinalityCheckpoints ¶
func (m *BeaconMockManager) Beacon_FinalityCheckpoints(ctx context.Context, stateId string) (client.FinalityCheckpointsResponse, error)
func (*BeaconMockManager) Beacon_Genesis ¶
func (m *BeaconMockManager) Beacon_Genesis(ctx context.Context) (client.GenesisResponse, error)
func (*BeaconMockManager) Beacon_Header ¶
func (m *BeaconMockManager) Beacon_Header(ctx context.Context, blockId string) (client.BeaconBlockHeaderResponse, bool, error)
func (*BeaconMockManager) Beacon_Validators ¶
func (m *BeaconMockManager) Beacon_Validators(ctx context.Context, stateId string, ids []string) (client.ValidatorsResponse, error)
func (*BeaconMockManager) Beacon_VoluntaryExits_Post ¶
func (m *BeaconMockManager) Beacon_VoluntaryExits_Post(ctx context.Context, request client.VoluntaryExitRequest) error
func (*BeaconMockManager) Config_DepositContract ¶
func (m *BeaconMockManager) Config_DepositContract(ctx context.Context) (client.Eth2DepositContractResponse, error)
func (*BeaconMockManager) Config_Spec ¶
func (m *BeaconMockManager) Config_Spec(ctx context.Context) (client.Eth2ConfigResponse, error)
func (*BeaconMockManager) GetConfig ¶
func (m *BeaconMockManager) GetConfig() *db.Config
Returns the manager's Beacon config
func (*BeaconMockManager) GetCurrentSlot ¶
func (m *BeaconMockManager) GetCurrentSlot() uint64
Returns the current Beacon chain slot
func (*BeaconMockManager) GetHighestSlot ¶
func (m *BeaconMockManager) GetHighestSlot() uint64
Returns the highest Beacon chain slot (top of the chain head)
func (*BeaconMockManager) GetValidator ¶
func (m *BeaconMockManager) GetValidator(id string) (*db.Validator, error)
Gets a validator by its index or pubkey
func (*BeaconMockManager) GetValidators ¶
func (m *BeaconMockManager) GetValidators(ids []string) ([]*db.Validator, error)
Gets multiple validators by their indices or pubkeys
func (*BeaconMockManager) IncrementSlot ¶
func (m *BeaconMockManager) IncrementSlot()
Increments the Beacon chain slot - use this to have parity with mining a new block on the EL
func (*BeaconMockManager) Node_Syncing ¶
func (m *BeaconMockManager) Node_Syncing(ctx context.Context) (client.SyncStatusResponse, error)
func (*BeaconMockManager) RevertToSnapshot ¶
func (m *BeaconMockManager) RevertToSnapshot(name string) error
Revert to a snapshot of the database state
func (*BeaconMockManager) SetCurrentSlot ¶
func (m *BeaconMockManager) SetCurrentSlot(slot uint64)
Sets the current Beacon chain slot
func (*BeaconMockManager) SetDatabase ¶
func (m *BeaconMockManager) SetDatabase(db *db.Database)
Set the database for the manager directly if you need to custom provision it
func (*BeaconMockManager) TakeSnapshot ¶
func (m *BeaconMockManager) TakeSnapshot(name string)
Take a snapshot of the current database state
func (*BeaconMockManager) Validator_DutiesProposer ¶
func (m *BeaconMockManager) Validator_DutiesProposer(ctx context.Context, indices []string, epoch uint64) (client.ProposerDutiesResponse, error)
func (*BeaconMockManager) Validator_DutiesSync_Post ¶
func (m *BeaconMockManager) Validator_DutiesSync_Post(ctx context.Context, indices []string, epoch uint64) (client.SyncDutiesResponse, error)
Click to show internal directories.
Click to hide internal directories.