refactor: clean-up discv5 configuration (#9143)

This commit is contained in:
Arsenii Kulikov
2024-06-27 19:25:24 +04:00
committed by GitHub
parent 6d8cbae3e6
commit 5aaf91dbcb
13 changed files with 120 additions and 199 deletions

View File

@ -27,7 +27,7 @@ use reth_stages::Pipeline;
use reth_static_file::StaticFileProducer;
use reth_tasks::TaskExecutor;
use reth_transaction_pool::noop::NoopTransactionPool;
use std::{net::SocketAddr, path::PathBuf, sync::Arc, time::Duration};
use std::{path::PathBuf, sync::Arc, time::Duration};
use tokio::sync::oneshot;
use tracing::*;
@ -65,11 +65,6 @@ impl Command {
.network
.network_config(config, provider_factory.chain_spec(), secret_key, default_peers_path)
.with_task_executor(Box::new(task_executor))
.listener_addr(SocketAddr::new(self.network.addr, self.network.port))
.discovery_addr(SocketAddr::new(
self.network.discovery.addr,
self.network.discovery.port,
))
.build(provider_factory)
.start_network()
.await?;