Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 06b5498

Browse files
committed
Remove commented out code
1 parent 6731f05 commit 06b5498

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

substrate/network-libp2p/src/service.rs

-7
Original file line numberDiff line numberDiff line change
@@ -312,9 +312,6 @@ impl NetworkContext for NetworkContextImpl {
312312
) -> Result<(), Error> {
313313
debug_assert!(self.inner.protocols.read().has_protocol(protocol),
314314
"invalid protocol id requested in the API of the libp2p networking");
315-
// TODO: restore
316-
//debug_assert!(packet_id < self.inner.protocols.read().iter().find(|p| p.id == protocol).unwrap().packet_count,
317-
// "invalid packet id requested in the API of the libp2p networking");
318315
// TODO: could be "optimized" by building `message` only after checking the validity of
319316
// the peer, but that's probably not worth the effort
320317
let mut message = Bytes::with_capacity(1 + data.len());
@@ -534,7 +531,6 @@ fn listener_handle<'a, C>(
534531
upgrade: FinalUpgrade<C>,
535532
endpoint: Endpoint,
536533
client_addr: impl Future<Item = Multiaddr, Error = IoError> + 'a,
537-
/*listener_upgrade: impl ConnectionUpgrade<C, Box<Future<Item = Multiaddr, Error = IoError>>>*/
538534
) -> Box<Future<Item = (), Error = IoError> + 'a>
539535
where C: AsyncRead + AsyncWrite + 'a {
540536
match upgrade {
@@ -550,9 +546,6 @@ fn listener_handle<'a, C>(
550546

551547
FinalUpgrade::Identify(IdentifyOutput::Sender { sender }, original_addr) => {
552548
trace!(target: "sub-libp2p", "Sending back identification info");
553-
/*let protocols_to_report = ConnectionUpgrade::<_, Box<Future<Item = Multiaddr, Error = IoError>>>::protocol_names(&listener_upgrade)
554-
.filter_map(|(name, _)| String::from_utf8(name.to_vec()).ok())
555-
.collect();*/
556549
sender.send(
557550
IdentifyInfo {
558551
public_key: shared.network_state.local_public_key().clone(),

0 commit comments

Comments
 (0)