diff --git a/swarm/src/lib.rs b/swarm/src/lib.rs index d0ae6118190..cb3abbc01e1 100644 --- a/swarm/src/lib.rs +++ b/swarm/src/lib.rs @@ -136,7 +136,7 @@ use tracing::Instrument; #[doc(hidden)] pub use translation::_address_translation; -use crate::{behaviour::ExternalAddrConfirmed, handler::UpgradeInfoSend}; +use crate::behaviour::ExternalAddrConfirmed; /// Event generated by the [`NetworkBehaviour`] that the swarm will report back. type TBehaviourOutEvent = ::ToSwarm; @@ -323,9 +323,6 @@ where /// handlers. behaviour: TBehaviour, - /// List of protocols that the behaviour says it supports. - supported_protocols: SmallVec<[Vec; 16]>, - confirmed_external_addr: HashSet, /// Multiaddresses that our listeners are listening on, @@ -360,7 +357,6 @@ where transport, pool: Pool::new(local_peer_id, config.pool_config), behaviour, - supported_protocols: Default::default(), confirmed_external_addr: Default::default(), listened_addrs: HashMap::new(), pending_handler_event: None, @@ -766,13 +762,6 @@ where } } }; - - let supported_protocols = handler - .listen_protocol() - .upgrade() - .protocol_info() - .map(|p| p.as_ref().as_bytes().to_vec()) - .collect(); let other_established_connection_ids = self .pool .iter_established_connections_of_peer(&peer_id) @@ -810,7 +799,6 @@ where other_established: other_established_connection_ids.len(), }, )); - self.supported_protocols = supported_protocols; self.pending_swarm_events .push_back(SwarmEvent::ConnectionEstablished { peer_id,