From 89504b3b879a4ae7c46c1cd05eae80c223b349f4 Mon Sep 17 00:00:00 2001 From: Josh Wilson Date: Wed, 29 Nov 2023 10:42:02 +0100 Subject: [PATCH] fix: use default DialConditions unless explicitly required --- protocols/kad/src/behaviour.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/protocols/kad/src/behaviour.rs b/protocols/kad/src/behaviour.rs index cde4fbb85364..6eccddac134c 100644 --- a/protocols/kad/src/behaviour.rs +++ b/protocols/kad/src/behaviour.rs @@ -570,9 +570,7 @@ where } kbucket::InsertResult::Pending { disconnected } => { self.queued_events.push_back(ToSwarm::Dial { - opts: DialOpts::peer_id(disconnected.into_preimage()) - .condition(dial_opts::PeerCondition::NotDialing) - .build(), + opts: DialOpts::peer_id(disconnected.into_preimage()).build(), }); RoutingUpdate::Pending } @@ -1311,7 +1309,6 @@ where if !self.connected_peers.contains(disconnected.preimage()) { self.queued_events.push_back(ToSwarm::Dial { opts: DialOpts::peer_id(disconnected.into_preimage()) - .condition(dial_opts::PeerCondition::NotDialing) .build(), }) } @@ -2517,9 +2514,7 @@ where } else if &peer_id != self.kbuckets.local_key().preimage() { query.inner.pending_rpcs.push((peer_id, event)); self.queued_events.push_back(ToSwarm::Dial { - opts: DialOpts::peer_id(peer_id) - .condition(dial_opts::PeerCondition::NotDialing) - .build(), + opts: DialOpts::peer_id(peer_id).build(), }); } }