mock

package
v4.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 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 MockValidator

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

func (MockValidator) AllValidatorsAreExited

func (_ MockValidator) AllValidatorsAreExited(_ context.Context) (bool, error)

func (MockValidator) CanonicalHeadSlot

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

func (MockValidator) CheckDoppelGanger

func (_ MockValidator) CheckDoppelGanger(_ context.Context) error

func (MockValidator) Done

func (_ MockValidator) Done()

func (MockValidator) HandleKeyReload

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

func (MockValidator) HasProposerSettings

func (MockValidator) HasProposerSettings() bool

HasProposerSettings for mocking

func (MockValidator) Keymanager

func (m MockValidator) Keymanager() (keymanager.IKeymanager, error)

func (MockValidator) LogAttestationsSubmitted

func (_ MockValidator) LogAttestationsSubmitted()

func (MockValidator) LogSyncCommitteeMessagesSubmitted

func (_ MockValidator) LogSyncCommitteeMessagesSubmitted()

func (MockValidator) LogValidatorGainsAndLosses

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

func (MockValidator) NextSlot

func (_ MockValidator) NextSlot() <-chan primitives.Slot

func (MockValidator) ProposeBlock

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

func (*MockValidator) ProposerSettings

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

ProposerSettings for mocking

func (MockValidator) PushProposerSettings

func (_ MockValidator) PushProposerSettings(_ context.Context, _ keymanager.IKeymanager, _ time.Time) error

PushProposerSettings for mocking

func (MockValidator) ReceiveBlocks

func (_ MockValidator) ReceiveBlocks(_ context.Context, _ chan<- error)

func (MockValidator) RolesAt

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

func (*MockValidator) SetProposerSettings

func (m *MockValidator) SetProposerSettings(settings *validatorserviceconfig.ProposerSettings)

SetProposerSettings for mocking

func (MockValidator) SetPubKeyToValidatorIndexMap

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

SetPubKeyToValidatorIndexMap for mocking

func (MockValidator) SignValidatorRegistrationRequest

SignValidatorRegistrationRequest for mocking

func (MockValidator) SlotDeadline

func (_ MockValidator) SlotDeadline(_ primitives.Slot) time.Time

func (MockValidator) SubmitAggregateAndProof

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

func (MockValidator) SubmitAttestation

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

func (MockValidator) SubmitSignedContributionAndProof

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

func (MockValidator) SubmitSyncCommitteeMessage

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

func (MockValidator) UpdateDomainDataCaches

func (_ MockValidator) UpdateDomainDataCaches(_ context.Context, _ primitives.Slot)

func (MockValidator) UpdateDuties

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

func (MockValidator) WaitForActivation

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

func (MockValidator) WaitForChainStart

func (_ MockValidator) WaitForChainStart(_ context.Context) error

func (MockValidator) WaitForKeymanagerInitialization

func (_ MockValidator) WaitForKeymanagerInitialization(_ context.Context) error

func (MockValidator) WaitForSync

func (_ MockValidator) 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
	// 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) error

WriteFileAtPath --

Jump to

Keyboard shortcuts

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