aboutsummaryrefslogtreecommitdiffstats
path: root/src/transport/identity.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/identity.rs')
-rw-r--r--src/transport/identity.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/transport/identity.rs b/src/transport/identity.rs
index eb7bb93..a748505 100644
--- a/src/transport/identity.rs
+++ b/src/transport/identity.rs
@@ -603,6 +603,15 @@ impl Transport for IdentityTransport {
self.shared.paths.rtt(&address)
}
+ /// The narrowest of its proven paths'.
+ fn clock_offset(&self, peer: &str) -> Option<crate::transport::paths::ClockOffset> {
+ self.shared
+ .proven_at(peer, false)
+ .iter()
+ .filter_map(|address| self.shared.paths.clock_offset(address))
+ .min_by_key(|offset| offset.within_ms)
+ }
+
/// The identity layer's, and each transport's.
fn stats(&self) -> TransportStats {
let mut stats = self.shared.paths.stats();