Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions swarm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<TBehaviour> = <TBehaviour as NetworkBehaviour>::ToSwarm;
Expand Down Expand Up @@ -323,9 +323,6 @@ where
/// handlers.
behaviour: TBehaviour,

/// List of protocols that the behaviour says it supports.
supported_protocols: SmallVec<[Vec<u8>; 16]>,

confirmed_external_addr: HashSet<Multiaddr>,

/// Multiaddresses that our listeners are listening on,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down
Loading