From c016fc783ff29e9069a446e17876046df64760a8 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 7 Nov 2026 22:35:10 +0100 Subject: dashboard: clocks on the page The page compares the clocks the reports on its map carry: this node's peers', and those of the nodes it subscribes to; the node no longer gathers them from LINKS (api/dashboard/clocks.rs goes). Auth plan M3 (preparing LINKS' removal). --- src/api/dashboard/mod.rs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/api/dashboard/mod.rs') diff --git a/src/api/dashboard/mod.rs b/src/api/dashboard/mod.rs index e86475f..78e8352 100644 --- a/src/api/dashboard/mod.rs +++ b/src/api/dashboard/mod.rs @@ -15,10 +15,7 @@ //! member tells of a change as it happens; the same answers for all clients. Or, if //! asked (`POST /admin/dashboard/links?live=false`, for every client, until asked //! otherwise or the node restarts), only asked every `LINKS_EVERY`, without -//! subscribing: fewer messages in the swarm, a map up to `LINKS_EVERY` behind. With -//! the clocks the links carry, every member's clock against the swarm's (`clocks`). - -mod clocks; +//! subscribing: fewer messages in the swarm, a map up to `LINKS_EVERY` behind. use std::collections::{BTreeMap, BTreeSet}; use std::convert::Infallible; @@ -396,15 +393,6 @@ async fn build(state: &AppState, graph: &Graph, live: bool) -> JsonValue { "epoch": epoch_json(epochs.get(member).copied()) }), ); } - let clocks = clocks::swarm( - local, - std::iter::once((local, &own[..])).chain( - replies - .iter() - .map(|(member, _, member_links)| (member.as_str(), &member_links[..])), - ), - u64::try_from(state.clock_skew_warn.as_millis()).unwrap_or(u64::MAX), - ); // Everyone on the map: in the member list's graph, measured, or at the other end of // a link measured. A node that joined through others is linked to them before its // registration reaches this node, and before the graph is computed again @@ -435,7 +423,6 @@ async fn build(state: &AppState, graph: &Graph, live: bool) -> JsonValue { "members": members_json, "intended": intended, "measured": measured, - "clocks": clocks, "live": live, }, "remakes": remakes, -- cgit v1.3.1