testing

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainService

type ChainService struct {
	State               *pb.BeaconState
	Root                []byte
	Block               *ethpb.BeaconBlock
	FinalizedCheckPoint *ethpb.Checkpoint
	StateFeed           *event.Feed
	BlocksReceived      []*ethpb.BeaconBlock
	Genesis             time.Time
}

ChainService defines the mock interface for testing

func (*ChainService) FinalizedCheckpt

func (ms *ChainService) FinalizedCheckpt() *ethpb.Checkpoint

FinalizedCheckpt mocks FinalizedCheckpt method in chain service.

func (*ChainService) GenesisTime

func (ms *ChainService) GenesisTime() time.Time

GenesisTime mocks the same method in the chain service.

func (*ChainService) HeadBlock

func (ms *ChainService) HeadBlock() *ethpb.BeaconBlock

HeadBlock mocks HeadBlock method in chain service.

func (*ChainService) HeadRoot

func (ms *ChainService) HeadRoot() []byte

HeadRoot mocks HeadRoot method in chain service.

func (*ChainService) HeadSlot

func (ms *ChainService) HeadSlot() uint64

HeadSlot mocks HeadSlot method in chain service.

func (*ChainService) HeadState

func (ms *ChainService) HeadState() *pb.BeaconState

HeadState mocks HeadState method in chain service.

func (*ChainService) HeadUpdatedFeed

func (ms *ChainService) HeadUpdatedFeed() *event.Feed

HeadUpdatedFeed mocks the same method in the chain service.

func (*ChainService) ReceiveAttestation

func (ms *ChainService) ReceiveAttestation(context.Context, *ethpb.Attestation) error

ReceiveAttestation mocks ReceiveAttestation method in chain service.

func (*ChainService) ReceiveAttestationNoPubsub

func (ms *ChainService) ReceiveAttestationNoPubsub(context.Context, *ethpb.Attestation) error

ReceiveAttestationNoPubsub mocks ReceiveAttestationNoPubsub method in chain service.

func (*ChainService) ReceiveBlock

func (ms *ChainService) ReceiveBlock(ctx context.Context, block *ethpb.BeaconBlock) error

ReceiveBlock mocks ReceiveBlock method in chain service.

func (*ChainService) ReceiveBlockNoPubsub

func (ms *ChainService) ReceiveBlockNoPubsub(ctx context.Context, block *ethpb.BeaconBlock) error

ReceiveBlockNoPubsub mocks ReceiveBlockNoPubsub method in chain service.

func (*ChainService) ReceiveBlockNoPubsubForkchoice

func (ms *ChainService) ReceiveBlockNoPubsubForkchoice(ctx context.Context, block *ethpb.BeaconBlock) error

ReceiveBlockNoPubsubForkchoice mocks ReceiveBlockNoPubsubForkchoice method in chain service.

func (*ChainService) ReceiveBlockNoVerify

func (ms *ChainService) ReceiveBlockNoVerify(ctx context.Context, block *ethpb.BeaconBlock) error

ReceiveBlockNoVerify mocks ReceiveBlockNoVerify method in chain service.

func (*ChainService) StateInitializedFeed

func (ms *ChainService) StateInitializedFeed() *event.Feed

StateInitializedFeed mocks the same method in the chain service.

Jump to

Keyboard shortcuts

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