testutil

package
v0.10.1-consensus-prin... Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: AGPL-3.0 Imports: 48 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectionNode

func CollectionNode(t *testing.T, hub *stub.Hub, identity *flow.Identity, identities []*flow.Identity, chainID flow.ChainID, options ...func(*protocol.State)) testmock.CollectionNode

CollectionNode returns a mock collection node.

func CollectionNodes

func CollectionNodes(t *testing.T, hub *stub.Hub, nNodes int, chainID flow.ChainID, options ...func(*protocol.State)) []testmock.CollectionNode

CollectionNodes returns n collection nodes connected to the given hub.

func ConsensusNode

func ConsensusNode(t *testing.T, hub *stub.Hub, identity *flow.Identity, identities []*flow.Identity, chainID flow.ChainID) testmock.ConsensusNode

func ConsensusNodes

func ConsensusNodes(t *testing.T, hub *stub.Hub, nNodes int, chainID flow.ChainID) []testmock.ConsensusNode

func ExecutionNode

func ExecutionNode(t *testing.T, hub *stub.Hub, identity *flow.Identity, identities []*flow.Identity, syncThreshold int, chainID flow.ChainID) testmock.ExecutionNode

func GenericNode

func GenericNode(t testing.TB, hub *stub.Hub, identity *flow.Identity, participants []*flow.Identity, chainID flow.ChainID, options ...func(*protocol.State)) testmock.GenericNode

func VerificationNode

func VerificationNode(t testing.TB,
	hub *stub.Hub,
	identity *flow.Identity,
	identities []*flow.Identity,
	assigner module.ChunkAssigner,
	requestInterval time.Duration,
	processInterval time.Duration,
	receiptsLimit uint,
	chunksLimit uint,
	failureThreshold uint,
	chainID flow.ChainID,
	collector module.VerificationMetrics,
	mempoolCollector module.MempoolMetrics,
	opts ...VerificationOpt) testmock.VerificationNode

Types

type RoundRobinLeaderSelection added in v0.10.0

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

func (*RoundRobinLeaderSelection) DKG added in v0.10.0

func (*RoundRobinLeaderSelection) Identities added in v0.10.0

func (s *RoundRobinLeaderSelection) Identities(blockID flow.Identifier, selector flow.IdentityFilter) (flow.IdentityList, error)

func (*RoundRobinLeaderSelection) Identity added in v0.10.0

func (s *RoundRobinLeaderSelection) Identity(blockID flow.Identifier, participantID flow.Identifier) (*flow.Identity, error)

func (*RoundRobinLeaderSelection) LeaderForView added in v0.10.0

func (s *RoundRobinLeaderSelection) LeaderForView(view uint64) (flow.Identifier, error)

func (*RoundRobinLeaderSelection) Self added in v0.10.0

type VerificationOpt

type VerificationOpt func(*testmock.VerificationNode)

func WithMatchEngine

func WithMatchEngine(eng network.Engine) VerificationOpt

func WithVerifierEngine

func WithVerifierEngine(eng network.Engine) VerificationOpt

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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