package
0.38.0-preview.0
Repository: https://github.com/onflow/flow-go.git
Documentation: pkg.go.dev

# Functions

IsRateLimitedPeerFilter returns a p2p.PeerFilter that will return an error if the peer is rate limited.
LibP2PNodeForNetworkFixture is a test helper that generate flow identities with a valid port and libp2p nodes.
MisbehaviorReportFixture generates a random misbehavior report.
MisbehaviorReportsFixture generates a slice of random misbehavior reports.
MisbehaviorTypeFixture generates a random misbehavior type.
No description provided by the author
NetworkPayloadFixture creates a blob of random bytes with the given size (in bytes) and returns it.
NetworksFixture generates the network for the given libp2p nodes.
No description provided by the author
NewRateLimiterConsumer returns a p2p.RateLimiterConsumer fixture that will invoke the callback provided.
NewTagWatchingConnManager creates a new TagWatchingConnManager with the given config.
OptionalSleep introduces a sleep to allow nodes to heartbeat and discover each other (only needed when using PubSub).
StartNetworks starts the provided networks using the provided irrecoverable context Arguments: - ctx: the irrecoverable context to use for starting the networks.
StartNodes starts the provided nodes and their peer managers using the provided irrecoverable context.
StartNodesAndNetworks starts the provided networks and libp2p nodes, returning the irrecoverable error channel.
StopComponents stops ReadyDoneAware instances in parallel and fails the test if they could not be stopped within the duration.

# Structs

No description provided by the author
MeshEngine is a simple engine that is used for testing the correctness of driving the engines with libp2p, it simply receives and stores the incoming messages.
No description provided by the author
RateLimitConsumer p2p.RateLimiterConsumer fixture that invokes a callback when rate limit event is consumed.
TagWatchingConnManager implements connection.ConnManager struct, and manages connections with tags.

# Type aliases

ConduitSendWrapperFunc is a wrapper around the set of methods offered by the Conduit (e.g., Publish).