From ff6d98bdd5f921942eb2b37d313d3b9d18acee40 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 28 Oct 2026 03:43:37 +0100 Subject: get swarm RTT from paths --- src/transport/identity.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/transport/identity.rs') diff --git a/src/transport/identity.rs b/src/transport/identity.rs index 153dacc..0c4cda4 100644 --- a/src/transport/identity.rs +++ b/src/transport/identity.rs @@ -496,6 +496,12 @@ impl Transport for IdentityTransport { true } + /// The best path's, where messages to `peer` go. + fn rtt(&self, peer: &str) -> Option { + let address = self.shared.proven_at(peer).into_iter().next()?; + self.shared.paths.rtt(&address) + } + /// The identity layer's, and each transport's. fn stats(&self) -> TransportStats { let mut stats = self.shared.paths.stats(); -- cgit v1.3.1