testutil

package
v4.2.1-rc.2 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: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FillDBWithBlocks added in v4.0.2

Types

type MockBlocker added in v4.0.2

type MockBlocker struct {
	BlockToReturn interfaces.ReadOnlySignedBeaconBlock
	ErrorToReturn error
	SlotBlockMap  map[primitives.Slot]interfaces.ReadOnlySignedBeaconBlock
	RootBlockMap  map[[32]byte]interfaces.ReadOnlySignedBeaconBlock
}

MockBlocker is a fake implementation of lookup.Blocker.

func (*MockBlocker) Blobs added in v4.2.0

Blobs --

func (*MockBlocker) Block added in v4.0.2

Block --

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 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

type MockStater added in v4.0.2

type MockStater struct {
	BeaconState       state.BeaconState
	StateProviderFunc func(ctx context.Context, stateId []byte) (state.BeaconState, error)
	BeaconStateRoot   []byte
	StatesBySlot      map[primitives.Slot]state.BeaconState
	StatesByRoot      map[[32]byte]state.BeaconState
}

MockStater is a fake implementation of lookup.Stater.

func (*MockStater) State added in v4.0.2

func (m *MockStater) State(ctx context.Context, id []byte) (state.BeaconState, error)

State --

func (*MockStater) StateBySlot added in v4.0.2

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

StateBySlot --

func (*MockStater) StateRoot added in v4.0.2

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

StateRoot --

Jump to

Keyboard shortcuts

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