From 6a06bc4a955cdf2b5a183c9ff21e25c79a4e5d9f Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 30 Nov 2026 19:36:56 +0000 Subject: federation: a stopped node on a set passes on what it holds back A store that stopped at an event it can't judge holds back what comes after, and its set gave none of it to others: what was put through such a node reached nobody, and a restart lost it. The set now names what its store holds back among what it gives, passes it on at once as it does what it took, and keeps it in its file; once the store takes again, it gives of it what the store took, or refused of its own. --- src/federation/held.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/federation/held.rs') diff --git a/src/federation/held.rs b/src/federation/held.rs index c5527cb..39d6102 100644 --- a/src/federation/held.rs +++ b/src/federation/held.rs @@ -1545,7 +1545,8 @@ pub(crate) async fn write( if state.of_a_set() { let holding = Arc::clone(&state.holding); let _ = tokio::task::spawn_blocking(move || holding.offer(bytes)).await; - let held = state.holding.with(|store| store.get(&id).is_some()); + // What the set gives: taken, or held back by a store that stopped. + let held = state.holding.with_set(|set| set.get(&id).is_some()); if held == Some(true) { crate::swarm::set::wrote(state, vec![id]).await; } -- cgit v1.3.1