testutil

package
v1.4.2-0...-e33850b Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 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 MockFetcher

type MockFetcher struct {
	BeaconState     state.BeaconState
	BeaconStateRoot []byte
}

MockFetcher is a fake implementation of statefetcher.Fetcher.

func (*MockFetcher) State

State --

func (*MockFetcher) StateBySlot

func (*MockFetcher) StateRoot added in v1.4.1

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() types.Slot

func (*MockGenesisTimeFetcher) GenesisTime

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

type MockPOWChainInfoFetcher

type MockPOWChainInfoFetcher struct {
	CurrEndpoint string
	CurrError    error
	Endpoints    []string
	Errors       []error
}

MockGenesisTimeFetcher is a fake implementation of the powchain.ChainInfoFetcher

func (*MockPOWChainInfoFetcher) CurrentETH1ConnectionError

func (m *MockPOWChainInfoFetcher) CurrentETH1ConnectionError() error

func (*MockPOWChainInfoFetcher) CurrentETH1Endpoint

func (m *MockPOWChainInfoFetcher) CurrentETH1Endpoint() string

func (*MockPOWChainInfoFetcher) ETH1ConnectionErrors

func (m *MockPOWChainInfoFetcher) ETH1ConnectionErrors() []error

func (*MockPOWChainInfoFetcher) ETH1Endpoints

func (m *MockPOWChainInfoFetcher) ETH1Endpoints() []string

func (*MockPOWChainInfoFetcher) Eth2GenesisPowchainInfo

func (m *MockPOWChainInfoFetcher) Eth2GenesisPowchainInfo() (uint64, *big.Int)

func (*MockPOWChainInfoFetcher) IsConnectedToETH1

func (m *MockPOWChainInfoFetcher) IsConnectedToETH1() bool

Jump to

Keyboard shortcuts

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