mock

package
v4.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Validator added in v4.2.0

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

func (*Validator) CanonicalHeadSlot added in v4.2.0

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

func (*Validator) CheckDoppelGanger added in v4.2.0

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

func (*Validator) Done added in v4.2.0

func (_ *Validator) Done()

func (*Validator) EventStreamIsRunning added in v4.2.1

func (_ *Validator) EventStreamIsRunning() bool

func (*Validator) HandleKeyReload added in v4.2.0

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

func (*Validator) HasProposerSettings added in v4.2.0

func (*Validator) HasProposerSettings() bool

HasProposerSettings for mocking

func (*Validator) Keymanager added in v4.2.0

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

func (*Validator) LogAttestationsSubmitted added in v4.2.0

func (_ *Validator) LogAttestationsSubmitted()

func (*Validator) LogSyncCommitteeMessagesSubmitted added in v4.2.0

func (_ *Validator) LogSyncCommitteeMessagesSubmitted()

func (*Validator) LogValidatorGainsAndLosses added in v4.2.0

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

func (*Validator) NextSlot added in v4.2.0

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

func (*Validator) NodeIsHealthy added in v4.2.1

func (_ *Validator) NodeIsHealthy(ctx context.Context) bool

func (*Validator) ProposeBlock added in v4.2.0

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

func (*Validator) ProposerSettings added in v4.2.0

func (m *Validator) ProposerSettings() *validatorserviceconfig.ProposerSettings

ProposerSettings for mocking

func (*Validator) PushProposerSettings added in v4.2.0

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

PushProposerSettings for mocking

func (*Validator) ReceiveSlots added in v4.2.0

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

func (*Validator) RolesAt added in v4.2.0

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

func (*Validator) SetProposerSettings added in v4.2.0

func (m *Validator) SetProposerSettings(_ context.Context, settings *validatorserviceconfig.ProposerSettings) error

SetProposerSettings for mocking

func (*Validator) SetPubKeyToValidatorIndexMap added in v4.2.0

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

SetPubKeyToValidatorIndexMap for mocking

func (*Validator) SignValidatorRegistrationRequest added in v4.2.0

SignValidatorRegistrationRequest for mocking

func (*Validator) SlotDeadline added in v4.2.0

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

func (*Validator) StartEventStream added in v4.2.1

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

func (*Validator) SubmitAggregateAndProof added in v4.2.0

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

func (*Validator) SubmitAttestation added in v4.2.0

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

func (*Validator) SubmitSignedContributionAndProof added in v4.2.0

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

func (*Validator) SubmitSyncCommitteeMessage added in v4.2.0

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

func (*Validator) UpdateDomainDataCaches added in v4.2.0

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

func (*Validator) UpdateDuties added in v4.2.0

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

func (*Validator) WaitForActivation added in v4.2.0

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

func (*Validator) WaitForChainStart added in v4.2.0

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

func (*Validator) WaitForKeymanagerInitialization added in v4.2.0

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

func (*Validator) WaitForSync added in v4.2.0

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
	// 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) Exists

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

Exists --

func (*Wallet) InitializeKeymanager

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

InitializeKeymanager --

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