aboutsummaryrefslogtreecommitdiffstats
path: root/src/federation/store/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-16 17:10:41 +0000
committertv <tv@krebsco.de>2026-11-16 18:28:20 +0100
commit8f6ec848b01fa692b09ae8aae25d383d281eb996 (patch)
treefdfd1a03b55802cb667c55b68b3c70817c413e91 /src/federation/store/mod.rs
parente7f8b368db441dbd2c91b08e7e04fa34bed01a1a (diff)
federation: groups that parted come together as parties come in, not by merges
A merge, a fork at heads of several stores, named every party's keys anew, so that a party wrote its key set again before anything a key of its set signed counted there; and kept each side's values side by side, so that a value a party replaced on one side came back where the other side's write had the lower ID. Letting the other side's parties in, by a version or a fork naming them, who sign again what they keep as a party's client signs again what a move refused, does the same with nothing new. So a fork is at heads of one store: the fold makes its root from that store's state, and the store from its own heads (`Store::fork`). Merges' rows go, those after them move up, and Roads not taken says why, with merging in place.
Diffstat (limited to 'src/federation/store/mod.rs')
-rw-r--r--src/federation/store/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/federation/store/mod.rs b/src/federation/store/mod.rs
index c87f337..b11c81a 100644
--- a/src/federation/store/mod.rs
+++ b/src/federation/store/mod.rs
@@ -97,9 +97,9 @@ pub(crate) trait Fold {
/// The state a checkpoint reads as, with the events it keeps.
fn start(checkpoint: &[u8], kept: &[(Id, Vec<u8>)]) -> Result<Self::State, Refused>;
- /// The root of a fork at `heads` of the stores reading as `at`, made by `spec`: its
+ /// The root of a fork at `heads` of the store reading as `at`, made by `spec`: its
/// bytes, and the events it keeps.
- fn fork(at: &[&Self::State], heads: &[Id], spec: &[u8]) -> Result<(Vec<u8>, Vec<Id>), Refused>;
+ fn fork(at: &Self::State, heads: &[Id], spec: &[u8]) -> Result<(Vec<u8>, Vec<Id>), Refused>;
/// The heads of a later checkpoint, where a store reading as `now` moves to one.
fn moves_to(now: &Self::State) -> Option<Vec<Id>>;