diff --git a/crates/net/ecies/src/stream.rs b/crates/net/ecies/src/stream.rs index d99422f512..adf4dc7634 100644 --- a/crates/net/ecies/src/stream.rs +++ b/crates/net/ecies/src/stream.rs @@ -67,8 +67,7 @@ where secret_key: SecretKey, remote_id: PeerId, ) -> Result { - let ecies = ECIESCodec::new_client(secret_key, remote_id) - .map_err(|_| io::Error::other("invalid handshake"))?; + let ecies = ECIESCodec::new_client(secret_key, remote_id)?; let mut transport = ecies.framed(transport);