aboutsummaryrefslogtreecommitdiffstats
path: root/src/transport/stats.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-28 06:01:40 +0100
committertv <tv@krebsco.de>2026-10-28 06:01:40 +0100
commit70fcc1ffba9a66c678e9e71b420521b1dd850eb9 (patch)
tree5874e234b37a6d0512d56b05d12a39c6666e7e17 /src/transport/stats.rs
parentb165fb87b3c36d7311c78552732a2f1713d342f1 (diff)
add location info to paths
Diffstat (limited to 'src/transport/stats.rs')
-rw-r--r--src/transport/stats.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/transport/stats.rs b/src/transport/stats.rs
index 12b2c99..6b99999 100644
--- a/src/transport/stats.rs
+++ b/src/transport/stats.rs
@@ -47,8 +47,13 @@ pub(crate) struct PathsStats {
#[derive(Debug, Clone, PartialEq, Serialize)]
#[serde(rename_all = "camelCase")]
pub(crate) struct PathInfo {
- /// `<scheme>:<transport identity>`.
+ /// `<scheme>:<transport identity>`: whom the path goes to, as the transport knows it
+ /// (a libp2p peer ID, a Mycelium public key, a node key for Tor).
pub(crate) address: String,
+ /// Where the path goes now (`Transport::location`): for libp2p, the remote address of
+ /// its connection; for Tor, the onion service. Absent where the address says it all
+ /// (Mycelium), or with no connection.
+ pub(crate) location: Option<String>,
/// Smoothed round-trip time of its PINGs (ours, and our keepalives); absent before
/// an answer.
pub(crate) rtt_ms: Option<f64>,