mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add NetworkManager::eth (#13936)
This commit is contained in:
@ -14,8 +14,8 @@ use std::net::{Ipv4Addr, SocketAddr, SocketAddrV4};
|
||||
|
||||
use reth::builder::NodeHandle;
|
||||
use reth_network::{
|
||||
config::SecretKey, protocol::IntoRlpxSubProtocol, EthNetworkPrimitives, NetworkConfig,
|
||||
NetworkManager, NetworkProtocols,
|
||||
config::SecretKey, protocol::IntoRlpxSubProtocol, NetworkConfig, NetworkManager,
|
||||
NetworkProtocols,
|
||||
};
|
||||
use reth_network_api::{test_utils::PeersHandleProvider, NetworkInfo};
|
||||
use reth_node_ethereum::EthereumNode;
|
||||
@ -53,7 +53,7 @@ fn main() -> eyre::Result<()> {
|
||||
.build_with_noop_provider(node.chain_spec());
|
||||
|
||||
// spawn the second network instance
|
||||
let subnetwork = NetworkManager::<EthNetworkPrimitives>::new(net_cfg).await?;
|
||||
let subnetwork = NetworkManager::eth(net_cfg).await?;
|
||||
let subnetwork_peer_id = *subnetwork.peer_id();
|
||||
let subnetwork_peer_addr = subnetwork.local_addr();
|
||||
let subnetwork_handle = subnetwork.peers_handle();
|
||||
|
||||
Reference in New Issue
Block a user