Skip to content

Commit 75e0216

Browse files
committed
identify: pK validation is not needed since it is not propagated above
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
1 parent fd6d641 commit 75e0216

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/protocol/libp2p/identify.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -345,20 +345,6 @@ impl Identify {
345345

346346
tracing::trace!(target: LOG_TARGET, ?peer, ?info, "peer identified");
347347

348-
// The check ensures the provided public key is the same one as the
349-
// one exchanged during the connection establishment.
350-
if let Some(public_key) = &info.public_key {
351-
let public_key = PublicKey::from_protobuf_encoding(&public_key).map_err(|err| {
352-
tracing::debug!(target: LOG_TARGET, ?peer, ?err, "peer identified provided undecodable public key");
353-
err
354-
})?;
355-
356-
if public_key.to_peer_id() != peer {
357-
tracing::debug!(target: LOG_TARGET, ?peer, "peer identified provided invalid public key");
358-
return Err(Error::InvalidData);
359-
}
360-
}
361-
362348
let listen_addresses = info
363349
.listen_addrs
364350
.iter()

0 commit comments

Comments
 (0)