From 362633603e9fc1912fd35807da5653dc1273a5be Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 30 Nov 2026 14:31:03 +0000 Subject: swarm: members read of where the node's document keeps them The swarm reads its members, their addresses, aliases, parties, tiers and links, at _continuum/members of the document the node holds. Where the node's document keeps them apart and hands them over as a tree (AppState::entries: a set of events, Holding::entries), they are read of that (view::members_of): by the topology, the node's registration, stability, working links, the state file's seeds, reach, and the API's aliases, dashboards and tier. No node's document does so yet but one whose store a set carries, which none starts as. --- src/api/dashboard/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/api/dashboard/mod.rs') diff --git a/src/api/dashboard/mod.rs b/src/api/dashboard/mod.rs index f5a91ac..4d9f3f4 100644 --- a/src/api/dashboard/mod.rs +++ b/src/api/dashboard/mod.rs @@ -354,6 +354,8 @@ async fn build(state: &AppState, graph: &Graph) -> JsonValue { let peers = serde_json::to_value(&list).unwrap_or_default(); let (aliases, dashboards, remakes) = { let replica = state.doc.read().await; + let entries = state.entries(); + let listed = crate::document::view::members_of(&entries, &replica.doc); // The remakes of our epoch, with who voted: the map shows them. let remakes = crate::remake::current( &state.remake, @@ -362,11 +364,11 @@ async fn build(state: &AppState, graph: &Graph) -> JsonValue { state.clock.now_millis(), state.timing.dormant_after.as_millis() as u64, ); - let dashboards: std::collections::HashMap = members::members(&replica.doc) + let dashboards: std::collections::HashMap = members::members(listed) .into_iter() - .filter_map(|pk| members::dashboard(&replica.doc, &pk).map(|url| (pk, url))) + .filter_map(|pk| members::dashboard(listed, &pk).map(|url| (pk, url))) .collect(); - (members::aliases(&replica.doc), dashboards, remakes) + (members::aliases(listed), dashboards, remakes) }; let local = state.local_id(); let intended: Map = graph -- cgit v1.3.1