Expand description
Common helpers for network testing. Common helpers for network testing.
Modules§
- transactions
- Test helper impls for transactions
Structs§
- Network
Event Stream - A helper type to await network events
- Peer
- A peer in the
Testnet
. - Peer
Config - A helper config for setting up the reth networking stack.
- Peer
Handle - A handle to a peer in the
Testnet
. - Testnet
- A test network consisting of multiple peers.
- Testnet
Handle - A handle to a
Testnet
that can be shared.
Constants§
- GETH_
TIMEOUT - The timeout for tests that create a
GethInstance
Functions§
- buffer_
hash_ to_ tx_ fetcher - Directly buffer hahs into tx fetcher for testing.
- enr_
to_ peer_ id - Obtains a
PeerId
from an ENR. In this case, thePeerId
represents the public key contained in the ENR. - new_
mock_ session - Mock a new session, returns (peer, channel-to-send-get-pooled-tx-response-on).
- new_
tx_ manager - A new tx manager for testing.
- unused_
port - A bit of hack to find an unused TCP port.
- unused_
tcp_ addr - Finds an unused tcp address
- unused_
tcp_ and_ udp_ port - Finds a single port that is unused for both TCP and UDP.
- unused_
tcp_ udp - Creates two unused
SocketAddrs
, intended for use as the p2p (TCP) and discovery ports (UDP) for new reth instances. - unused_
udp_ addr - Finds an unused udp address
- unused_
udp_ port - Finds an unused udp port