From 6e928f08fb84176a8fe8839bf00e39eb8f7dc942 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Tue, 26 Sep 2023 15:22:33 +0200 Subject: [PATCH] chore: add missing builder fn for outbound dials (#4786) --- crates/net/network/src/peers/manager.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/net/network/src/peers/manager.rs b/crates/net/network/src/peers/manager.rs index e7eb7416e068..6e4b62c7b7bd 100644 --- a/crates/net/network/src/peers/manager.rs +++ b/crates/net/network/src/peers/manager.rs @@ -1201,6 +1201,12 @@ impl PeersConfig { self } + /// Maximum allowed concurrent outbound dials. + pub fn with_max_concurrent_dials(mut self, max_concurrent_outbound_dials: usize) -> Self { + self.connection_info.max_concurrent_outbound_dials = max_concurrent_outbound_dials; + self + } + /// Nodes to always connect to. pub fn with_trusted_nodes(mut self, nodes: HashSet) -> Self { self.trusted_nodes = nodes;