docs(network): update Swarm struct to use NetworkPrimitives generic (#20677)

This commit is contained in:
iPLAY888
2025-12-30 13:12:00 +03:00
committed by GitHub
parent f79fdf3564
commit 34c6b8d81c

View File

@@ -183,13 +183,13 @@ The discovery task progresses as the network management task is polled, handling
[File: crates/net/network/src/swarm.rs](https://github.com/paradigmxyz/reth/blob/1563506aea09049a85e5cc72c2894f3f7a371581/crates/net/network/src/swarm.rs)
```rust,ignore
pub(crate) struct Swarm<C> {
pub(crate) struct Swarm<N: NetworkPrimitives = EthNetworkPrimitives> {
/// Listens for new incoming connections.
incoming: ConnectionListener,
/// All sessions.
sessions: SessionManager,
sessions: SessionManager<N>,
/// Tracks the entire state of the network and handles events received from the sessions.
state: NetworkState<C>,
state: NetworkState<N>,
}
```