diff options
| author | tv <tv@krebsco.de> | 2026-11-17 04:16:59 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-17 05:33:18 +0100 |
| commit | 5439b2e6b27a55a1da252cf745d0557686e9c815 (patch) | |
| tree | 2b26c192e22e1b130a2ca7674fc1713e94fa59f7 /src/state | |
| parent | 44a61c46160843d917a1da24bc8e364c5109960d (diff) | |
remake: holding a store, a node follows an epoch only from a checkpoint it builds
A node of a swarm holding a store rejoining an epoch (`docs/store.md`,
Remakes) follows it only where its snapshot has the swarm's policy and
store, and holds the node's document's checkpoint, one it builds from that
document, or one its operator pinned; with an empty document, the root of
its store too (`Holding::follows`). A made-up epoch holding another, the
root after the store moved on, say, would leave it holding events whose
history nobody puts again: it stays on its own, as when a rejoin's check
fails, and tries again later.
Diffstat (limited to 'src/state')
| -rw-r--r-- | src/state/host.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/state/host.rs b/src/state/host.rs index 345dfbf..0b2b27d 100644 --- a/src/state/host.rs +++ b/src/state/host.rs @@ -310,6 +310,12 @@ impl Host for AppState { Arc::clone(&self.holding) } + #[cfg(feature = "federation")] + fn store_id(&self) -> Option<crate::federation::store::Id> { + use crate::locks::MutexExt; + self.screening.lock_or_recover().store + } + fn current_epoch(&self) -> Epoch { self.local_epoch() } |
