feat: add NetworkManager::eth (#13936)

This commit is contained in:
Matthias Seitz
2025-01-23 00:05:36 +01:00
committed by GitHub
parent 24c5234a50
commit 4dcc135495
5 changed files with 28 additions and 14 deletions

View File

@ -8,8 +8,7 @@
use futures::StreamExt;
use reth_network::{
config::rng_secret_key, EthNetworkPrimitives, NetworkConfig, NetworkEventListenerProvider,
NetworkManager,
config::rng_secret_key, NetworkConfig, NetworkEventListenerProvider, NetworkManager,
};
use reth_provider::test_utils::NoopProvider;
@ -25,7 +24,7 @@ async fn main() -> eyre::Result<()> {
let config = NetworkConfig::builder(local_key).mainnet_boot_nodes().build(client);
// create the network instance
let network = NetworkManager::<EthNetworkPrimitives>::new(config).await?;
let network = NetworkManager::eth(config).await?;
// get a handle to the network to interact with it
let handle = network.handle().clone();