feat: make NetworkConfigBuilder independent of concrete ChainSpec (#11176)

This commit is contained in:
Arsenii Kulikov
2024-09-26 14:37:20 +03:00
committed by GitHub
parent f2a508df34
commit 65f2664471
21 changed files with 130 additions and 84 deletions

View File

@ -19,7 +19,6 @@ use reth_network::{
};
use reth_network_api::{test_utils::PeersHandleProvider, NetworkInfo};
use reth_node_ethereum::EthereumNode;
use reth_provider::test_utils::NoopProvider;
use subprotocol::{
connection::CustomCommand,
protocol::{
@ -51,7 +50,7 @@ fn main() -> eyre::Result<()> {
.listener_addr(SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, 0)))
.disable_discovery()
.add_rlpx_sub_protocol(custom_rlpx_handler_2.into_rlpx_sub_protocol())
.build(NoopProvider::default());
.build_with_noop_provider(node.chain_spec());
// spawn the second network instance
let subnetwork = NetworkManager::new(net_cfg).await?;