From a298f504ac7f5c89e9dbc201721a89b1eeaa7663 Mon Sep 17 00:00:00 2001 From: Grzegorz Prusak Date: Tue, 10 Sep 2024 11:20:32 +0200 Subject: [PATCH] feat: human readable information for handshake failures (#196) Error message suggesting checking the port configuration. --- node/actors/network/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/node/actors/network/src/lib.rs b/node/actors/network/src/lib.rs index 7f754809..41e953b5 100644 --- a/node/actors/network/src/lib.rs +++ b/node/actors/network/src/lib.rs @@ -180,7 +180,11 @@ impl Runner { tracing::info!("new connection"); let (stream, endpoint) = preface::accept(ctx, stream) .await - .context("preface::accept()")?; + .context("preface::accept()") + .context( + "establishing new incoming TCP connection failed. \ + The possible cause is that someone was trying to establish a non-consensus connection to the consensus port. \ + If you believe this connection should have succeeded, please check your port configuration")?; match endpoint { preface::Endpoint::ConsensusNet => { if let Some(c) = &self.net.consensus {