mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-14 17:05:06 -05:00
perf: use try_join_all when resolving bootnodes (#9886)
This commit is contained in:
@@ -202,11 +202,8 @@ impl NetworkManager {
|
||||
let listener_addr = incoming.local_address();
|
||||
|
||||
// resolve boot nodes
|
||||
let mut resolved_boot_nodes = vec![];
|
||||
for record in &boot_nodes {
|
||||
let resolved = record.resolve().await?;
|
||||
resolved_boot_nodes.push(resolved);
|
||||
}
|
||||
let resolved_boot_nodes =
|
||||
futures::future::try_join_all(boot_nodes.iter().map(|record| record.resolve())).await?;
|
||||
|
||||
if let Some(disc_config) = discovery_v4_config.as_mut() {
|
||||
// merge configured boot nodes
|
||||
|
||||
Reference in New Issue
Block a user