From ba62330401a60c01f22ce451a45fd460467bfb84 Mon Sep 17 00:00:00 2001 From: Saad Talaat Date: Wed, 26 Feb 2025 09:50:44 +0200 Subject: [PATCH] fix(identify): Remove peer from `Behaviour::discovered_peers` if a `DialError::LocalPeerId` is encountered --- protocols/identify/src/behaviour.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/protocols/identify/src/behaviour.rs b/protocols/identify/src/behaviour.rs index a51df0844e6..d6b7d322ae4 100644 --- a/protocols/identify/src/behaviour.rs +++ b/protocols/identify/src/behaviour.rs @@ -587,6 +587,9 @@ impl NetworkBehaviour for Behaviour { DialError::WrongPeerId { endpoint: ConnectedPoint::Dialer { address, .. }, .. + } + | DialError::LocalPeerId { + endpoint: ConnectedPoint::Dialer { address, .. }, } => { cache.remove(&peer_id, address); }