mock

package
v5.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Validator

type Validator struct {
	Km keymanager.IKeymanager
	// contains filtered or unexported fields
}

func (*Validator) CanonicalHeadSlot

func (_ *Validator) CanonicalHeadSlot(_ context.Context) (primitives.Slot, error)

func (*Validator) ChangeHost added in v5.1.0

func (*Validator) ChangeHost()

func (*Validator) CheckDoppelGanger

func (_ *Validator) CheckDoppelGanger(_ context.Context) error

func (*Validator) DeleteGraffiti added in v5.0.2

func (m *Validator) DeleteGraffiti(_ context.Context, _ [fieldparams.BLSPubkeyLength]byte) error

DeleteGraffiti for mocking

func (*Validator) Done

func (_ *Validator) Done()

func (*Validator) EventStreamIsRunning

func (*Validator) EventStreamIsRunning() bool

func (*Validator) Graffiti added in v5.1.0

Graffiti for mocking

func (*Validator) HandleKeyReload

func (_ *Validator) HandleKeyReload(_ context.Context, _ [][48]byte) (bool, error)

func (*Validator) HasProposerSettings

func (*Validator) HasProposerSettings() bool

HasProposerSettings for mocking

func (*Validator) HealthTracker added in v5.0.2

func (*Validator) HealthTracker() *beacon.NodeHealthTracker

func (*Validator) Host added in v5.1.0

func (*Validator) Host() string

func (*Validator) Keymanager

func (m *Validator) Keymanager() (keymanager.IKeymanager, error)

func (*Validator) LogSubmittedAtts

func (_ *Validator) LogSubmittedAtts(_ primitives.Slot)

func (*Validator) LogSubmittedSyncCommitteeMessages

func (_ *Validator) LogSubmittedSyncCommitteeMessages()

func (*Validator) LogValidatorGainsAndLosses

func (_ *Validator) LogValidatorGainsAndLosses(_ context.Context, _ primitives.Slot) error

func (*Validator) NextSlot

func (_ *Validator) NextSlot() <-chan primitives.Slot

func (*Validator) ProcessEvent added in v5.0.2

func (*Validator) ProcessEvent(event *event.Event)

func (*Validator) ProposeBlock

func (_ *Validator) ProposeBlock(_ context.Context, _ primitives.Slot, _ [48]byte)

func (*Validator) ProposerSettings

func (m *Validator) ProposerSettings() *proposer.Settings

ProposerSettings for mocking

func (*Validator) PushProposerSettings

func (_ *Validator) PushProposerSettings(_ context.Context, _ keymanager.IKeymanager, _ primitives.Slot, _ bool) error

PushProposerSettings for mocking

func (*Validator) ReceiveSlots

func (_ *Validator) ReceiveSlots(_ context.Context, _ chan<- error)

func (*Validator) RolesAt

func (_ *Validator) RolesAt(_ context.Context, _ primitives.Slot) (map[[48]byte][]iface2.ValidatorRole, error)

func (*Validator) SetGraffiti added in v5.0.2

func (m *Validator) SetGraffiti(_ context.Context, _ [fieldparams.BLSPubkeyLength]byte, graffiti []byte) error

SetGraffiti for mocking

func (*Validator) SetProposerSettings

func (m *Validator) SetProposerSettings(_ context.Context, settings *proposer.Settings) error

SetProposerSettings for mocking

func (*Validator) SetPubKeyToValidatorIndexMap

func (_ *Validator) SetPubKeyToValidatorIndexMap(_ context.Context, _ keymanager.IKeymanager) error

SetPubKeyToValidatorIndexMap for mocking

func (*Validator) SignValidatorRegistrationRequest

SignValidatorRegistrationRequest for mocking

func (*Validator) SlotDeadline

func (_ *Validator) SlotDeadline(_ primitives.Slot) time.Time

func (*Validator) StartEventStream

func (*Validator) StartEventStream(_ context.Context, _ []string, _ chan<- *event.Event)

func (*Validator) SubmitAggregateAndProof

func (_ *Validator) SubmitAggregateAndProof(_ context.Context, _ primitives.Slot, _ [48]byte)

func (*Validator) SubmitAttestation

func (_ *Validator) SubmitAttestation(_ context.Context, _ primitives.Slot, _ [48]byte)

func (*Validator) SubmitSignedContributionAndProof

func (_ *Validator) SubmitSignedContributionAndProof(_ context.Context, _ primitives.Slot, _ [48]byte)

func (*Validator) SubmitSyncCommitteeMessage

func (_ *Validator) SubmitSyncCommitteeMessage(_ context.Context, _ primitives.Slot, _ [48]byte)

func (*Validator) UpdateDomainDataCaches

func (_ *Validator) UpdateDomainDataCaches(_ context.Context, _ primitives.Slot)

func (*Validator) UpdateDuties

func (_ *Validator) UpdateDuties(_ context.Context, _ primitives.Slot) error

func (*Validator) WaitForActivation

func (_ *Validator) WaitForActivation(_ context.Context, _ chan [][48]byte) error

func (*Validator) WaitForChainStart

func (_ *Validator) WaitForChainStart(_ context.Context) error

func (*Validator) WaitForKeymanagerInitialization

func (_ *Validator) WaitForKeymanagerInitialization(_ context.Context) error

func (*Validator) WaitForSync

func (_ *Validator) WaitForSync(_ context.Context) error

type Wallet

type Wallet struct {
	InnerAccountsDir  string
	Directories       []string
	Files             map[string]map[string][]byte
	EncryptedSeedFile []byte
	AccountPasswords  map[string]string
	WalletPassword    string
	UnlockAccounts    bool

	HasWriteFileError bool
	WalletDir         string
	Kind              keymanager.Kind
	// contains filtered or unexported fields
}

Wallet contains an in-memory, simulated wallet implementation.

func (*Wallet) AccountNames

func (w *Wallet) AccountNames() ([]string, error)

AccountNames --

func (*Wallet) AccountsDir

func (w *Wallet) AccountsDir() string

AccountsDir --

func (*Wallet) Dir added in v5.1.0

func (w *Wallet) Dir() string

Dir for the wallet.

func (*Wallet) Exists

func (w *Wallet) Exists() (bool, error)

Exists --

func (*Wallet) InitializeKeymanager

func (_ *Wallet) InitializeKeymanager(_ context.Context, _ iface.InitKeymanagerConfig) (keymanager.IKeymanager, error)

InitializeKeymanager --

func (*Wallet) KeymanagerKind added in v5.1.0

func (w *Wallet) KeymanagerKind() keymanager.Kind

KeymanagerKind --

func (*Wallet) Password

func (w *Wallet) Password() string

Password --

func (*Wallet) ReadFileAtPath

func (w *Wallet) ReadFileAtPath(_ context.Context, pathName, fileName string) ([]byte, error)

ReadFileAtPath --

func (*Wallet) WriteFileAtPath

func (w *Wallet) WriteFileAtPath(_ context.Context, pathName, fileName string, data []byte) (bool, error)

WriteFileAtPath --

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL