testutil

package
v3.2.2-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockExecutionChainInfoFetcher

type MockExecutionChainInfoFetcher struct {
	CurrEndpoint string
	CurrError    error
}

MockExecutionChainInfoFetcher is a fake implementation of the powchain.ChainInfoFetcher

func (*MockExecutionChainInfoFetcher) ExecutionClientConnected

func (*MockExecutionChainInfoFetcher) ExecutionClientConnected() bool

func (*MockExecutionChainInfoFetcher) ExecutionClientConnectionErr

func (m *MockExecutionChainInfoFetcher) ExecutionClientConnectionErr() error

func (*MockExecutionChainInfoFetcher) ExecutionClientEndpoint

func (m *MockExecutionChainInfoFetcher) ExecutionClientEndpoint() string

func (*MockExecutionChainInfoFetcher) GenesisExecutionChainInfo

func (*MockExecutionChainInfoFetcher) GenesisExecutionChainInfo() (uint64, *big.Int)

type MockFetcher

type MockFetcher struct {
	BeaconState     state.BeaconState
	BeaconStateRoot []byte
	StatesBySlot    map[primitives.Slot]state.BeaconState
}

MockFetcher is a fake implementation of statefetcher.Fetcher.

func (*MockFetcher) State

State --

func (*MockFetcher) StateBySlot

func (m *MockFetcher) StateBySlot(_ context.Context, s primitives.Slot) (state.BeaconState, error)

func (*MockFetcher) StateRoot

func (m *MockFetcher) StateRoot(context.Context, []byte) ([]byte, error)

StateRoot --

type MockGenesisTimeFetcher

type MockGenesisTimeFetcher struct {
	Genesis time.Time
}

MockGenesisTimeFetcher is a fake implementation of the blockchain.TimeFetcher

func (*MockGenesisTimeFetcher) CurrentSlot

func (m *MockGenesisTimeFetcher) CurrentSlot() primitives.Slot

func (*MockGenesisTimeFetcher) GenesisTime

func (m *MockGenesisTimeFetcher) GenesisTime() time.Time

Jump to

Keyboard shortcuts

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