mock

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAggregateAttestationsSubmitter

func NewAggregateAttestationsSubmitter() eth2client.AggregateAttestationsSubmitter

NewAggregateAttestationsSubmitter returns a mock aggregate attestation submitter with the provided value.

func NewAttestationSubmitter

func NewAttestationSubmitter() eth2client.AttestationsSubmitter

NewAttestationSubmitter returns a mock attestations submitter with the provided value.

func NewBeaconBlockSubmitter

func NewBeaconBlockSubmitter() eth2client.BeaconBlockSubmitter

NewBeaconBlockSubmitter returns a mock beacon block submitter with the provided value.

func NewBeaconCommitteeSubscriptionsSubmitter

func NewBeaconCommitteeSubscriptionsSubmitter() eth2client.BeaconCommitteeSubscriptionsSubmitter

NewBeaconCommitteeSubscriptionsSubmitter returns a mock beacon committee subscription submitter with the provided value.

func NewForkScheduleProvider added in v0.4.0

func NewForkScheduleProvider(schedule []*phase0.Fork) eth2client.ForkScheduleProvider

NewForkScheduleProvider returns a mock spec provider with the provided values.

func NewGenesisTimeProvider

func NewGenesisTimeProvider(genesisTime time.Time) eth2client.GenesisTimeProvider

NewGenesisTimeProvider returns a mock genesis time provider with the provided value.

func NewSlotsPerEpochProvider

func NewSlotsPerEpochProvider(slotsPerEpoch uint64) eth2client.SlotsPerEpochProvider

NewSlotsPerEpochProvider returns a mock slots per epoch provider with the provided value.

func NewSpecProvider added in v0.4.0

func NewSpecProvider(slotDuration time.Duration,
	slotsPerEpoch uint64,
	epochsPerSyncCommitteePeriod uint64,
) eth2client.SpecProvider

NewSpecProvider returns a mock spec provider with the provided values.

Types

type AggregateAttestationsSubmitter

type AggregateAttestationsSubmitter struct{}

AggregateAttestationsSubmitter is a mock for eth2client.AggregateAttestationsSubmitter.

func (*AggregateAttestationsSubmitter) SubmitAggregateAttestations

func (m *AggregateAttestationsSubmitter) SubmitAggregateAttestations(ctx context.Context, aggregates []*phase0.SignedAggregateAndProof) error

SubmitAggregateAttestations is a mock.

type AttestationsSubmitter added in v0.1.5

type AttestationsSubmitter struct{}

AttestationsSubmitter is a mock for eth2client.AttestationsSubmitter.

func (*AttestationsSubmitter) SubmitAttestations added in v0.1.5

func (m *AttestationsSubmitter) SubmitAttestations(ctx context.Context, attestations []*phase0.Attestation) error

SubmitAttestations is a mock.

type BeaconBlockSubmitter

type BeaconBlockSubmitter struct{}

BeaconBlockSubmitter is a mock for eth2client.BeaconBlockSubmitter.

func (*BeaconBlockSubmitter) SubmitBeaconBlock

func (m *BeaconBlockSubmitter) SubmitBeaconBlock(ctx context.Context, bloc *spec.VersionedSignedBeaconBlock) error

SubmitBeaconBlock is a mock.

type BeaconCommitteeSubscriptionsSubmitter

type BeaconCommitteeSubscriptionsSubmitter struct{}

BeaconCommitteeSubscriptionsSubmitter is a mock for eth2client.BeaconCommitteeSubscriptionsSubmitter.

func (*BeaconCommitteeSubscriptionsSubmitter) SubmitBeaconCommitteeSubscriptions

func (m *BeaconCommitteeSubscriptionsSubmitter) SubmitBeaconCommitteeSubscriptions(ctx context.Context, subscriptions []*api.BeaconCommitteeSubscription) error

SubmitBeaconCommitteeSubscriptions is a mock.

type ForkScheduleProvider added in v0.4.0

type ForkScheduleProvider struct {
	// contains filtered or unexported fields
}

ForkScheduleProvider is a mock for eth2client.ForkScheduleProvider.

func (*ForkScheduleProvider) ForkSchedule added in v0.4.0

func (m *ForkScheduleProvider) ForkSchedule(ctx context.Context) ([]*phase0.Fork, error)

ForkSchedule is a mock.

type GenesisTimeProvider

type GenesisTimeProvider struct {
	// contains filtered or unexported fields
}

GenesisTimeProvider is a mock for eth2client.GenesisTimeProvider.

func (*GenesisTimeProvider) GenesisTime

func (m *GenesisTimeProvider) GenesisTime(ctx context.Context) (time.Time, error)

GenesisTime is a mock.

type SlotsPerEpochProvider

type SlotsPerEpochProvider struct {
	// contains filtered or unexported fields
}

SlotsPerEpochProvider is a mock for eth2client.SlotsPerEpochProvider.

func (*SlotsPerEpochProvider) SlotsPerEpoch

func (m *SlotsPerEpochProvider) SlotsPerEpoch(ctx context.Context) (uint64, error)

SlotsPerEpoch is a mock.

type SpecProvider added in v0.4.0

type SpecProvider struct {
	// contains filtered or unexported fields
}

SpecProvider is a mock for eth2client.SpecProvider.

func (*SpecProvider) Spec added in v0.4.0

func (m *SpecProvider) Spec(ctx context.Context) (map[string]interface{}, error)

Spec is a mock.

Jump to

Keyboard shortcuts

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