Skip to content

Commit 43cb2db

Browse files
committed
crypto/noise: Add peerID to both failures
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
1 parent 3bd9085 commit 43cb2db

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

src/crypto/noise/mod.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,13 @@ impl<S: AsyncRead + AsyncWrite + Unpin> AsyncRead for NoiseSocket<S> {
545545
buf,
546546
) {
547547
Err(error) => {
548-
tracing::error!(target: LOG_TARGET, ?error, peer = ?this.peer, "failed to decrypt message for bigger buffers");
548+
tracing::error!(
549+
target: LOG_TARGET,
550+
?error,
551+
peer = ?this.peer,
552+
"failed to decrypt message for bigger buffers"
553+
);
554+
549555
return Poll::Ready(Err(io::ErrorKind::InvalidData.into()));
550556
}
551557
Ok(nread) => {
@@ -563,7 +569,13 @@ impl<S: AsyncRead + AsyncWrite + Unpin> AsyncRead for NoiseSocket<S> {
563569
&mut buffer,
564570
) {
565571
Err(error) => {
566-
tracing::error!(target: LOG_TARGET, ?error, "failed to decrypt message for smaller buffers");
572+
tracing::error!(
573+
target: LOG_TARGET,
574+
?error,
575+
peer = ?this.peer,
576+
"failed to decrypt message for smaller buffers"
577+
);
578+
567579
return Poll::Ready(Err(io::ErrorKind::InvalidData.into()));
568580
}
569581
Ok(nread) => {

0 commit comments

Comments
 (0)