Module test_utils
Available on crate feature
test-utils
only.Expand description
Common helpers for network testing. Common helpers for network testing.
Structs§
- A helper type to await network events
- A peer in the
Testnet
. - A helper config for setting up the reth networking stack.
- A handle to a peer in the
Testnet
. - A test network consisting of multiple peers.
- A handle to a
Testnet
that can be shared.
Constants§
- The timeout for tests that create a
GethInstance
Functions§
- Obtains a
PeerId
from an ENR. In this case, thePeerId
represents the public key contained in the ENR. - A bit of hack to find an unused TCP port.
- Finds an unused tcp address
- Finds a single port that is unused for both TCP and UDP.
- Creates two unused
SocketAddrs
, intended for use as the p2p (TCP) and discovery ports (UDP) for new reth instances. - Finds an unused udp address
- Finds an unused udp port