Skip to content

Commit 2faf1c7

Browse files
feat: Added Socket Address to the network discovery error (paradigmxyz#16659)
1 parent afa3aca commit 2faf1c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/net/network/src/error.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ pub enum NetworkError {
5353
error: io::Error,
5454
},
5555
/// IO error when creating the discovery service
56-
#[error("failed to launch discovery service: {0}")]
57-
Discovery(io::Error),
56+
#[error("failed to launch discovery service on {0}: {1}")]
57+
Discovery(SocketAddr, io::Error),
5858
/// An error occurred with discovery v5 node.
5959
#[error("discv5 error, {0}")]
6060
Discv5Error(#[from] reth_discv5::Error),
@@ -71,8 +71,8 @@ impl NetworkError {
7171
match err.kind() {
7272
ErrorKind::AddrInUse => Self::AddressAlreadyInUse { kind, error: err },
7373
_ => {
74-
if let ServiceKind::Discovery(_) = kind {
75-
return Self::Discovery(err)
74+
if let ServiceKind::Discovery(address) = kind {
75+
return Self::Discovery(address, err)
7676
}
7777
Self::Io(err)
7878
}

0 commit comments

Comments
 (0)