docs(network): update FetchClient struct to use NetworkPrimitives generic (#20680)

This commit is contained in:
iPLAY888
2025-12-30 14:23:12 +03:00
committed by GitHub
parent 4eaa5c7d46
commit 3b4bc77532

View File

@@ -284,11 +284,10 @@ The `FetchClient` struct, similar to `NetworkHandle`, can be shared across threa
[File: crates/net/network/src/fetch/client.rs](https://github.com/paradigmxyz/reth/blob/1563506aea09049a85e5cc72c2894f3f7a371581/crates/net/network/src/fetch/client.rs)
```rust,ignore
pub struct FetchClient {
/// Sender half of the request channel.
pub(crate) request_tx: UnboundedSender<DownloadRequest>,
/// The handle to the peers
pub(crate) peers_handle: PeersHandle,
pub struct FetchClient<N: NetworkPrimitives = EthNetworkPrimitives> {
request_tx: UnboundedSender<DownloadRequest<N>>,
peers_handle: PeersHandle,
num_active_peers: Arc<AtomicUsize>
}
```