@@ -312,9 +312,6 @@ impl NetworkContext for NetworkContextImpl {
312
312
) -> Result < ( ) , Error > {
313
313
debug_assert ! ( self . inner. protocols. read( ) . has_protocol( protocol) ,
314
314
"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");
318
315
// TODO: could be "optimized" by building `message` only after checking the validity of
319
316
// the peer, but that's probably not worth the effort
320
317
let mut message = Bytes :: with_capacity ( 1 + data. len ( ) ) ;
@@ -534,7 +531,6 @@ fn listener_handle<'a, C>(
534
531
upgrade : FinalUpgrade < C > ,
535
532
endpoint : Endpoint ,
536
533
client_addr : impl Future < Item = Multiaddr , Error = IoError > + ' a ,
537
- /*listener_upgrade: impl ConnectionUpgrade<C, Box<Future<Item = Multiaddr, Error = IoError>>>*/
538
534
) -> Box < Future < Item = ( ) , Error = IoError > + ' a >
539
535
where C : AsyncRead + AsyncWrite + ' a {
540
536
match upgrade {
@@ -550,9 +546,6 @@ fn listener_handle<'a, C>(
550
546
551
547
FinalUpgrade :: Identify ( IdentifyOutput :: Sender { sender } , original_addr) => {
552
548
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();*/
556
549
sender. send (
557
550
IdentifyInfo {
558
551
public_key : shared. network_state . local_public_key ( ) . clone ( ) ,
0 commit comments