summaryrefslogtreecommitdiffstats
path: root/src/remake/snapshot.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-21 14:51:51 +0200
committertv <tv@krebsco.de>2026-10-21 14:51:51 +0200
commitd332830dfee1c6da4726cd69698f9edd18a33e0e (patch)
tree48d3dbc479902c2d56f1b5e4ab35484125ec1bac /src/remake/snapshot.rs
parent8891ebd88f87ff93c1efab51d0b9373f845a1dee (diff)
rename cluster to swarm everywhere!
Diffstat (limited to 'src/remake/snapshot.rs')
-rw-r--r--src/remake/snapshot.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/remake/snapshot.rs b/src/remake/snapshot.rs
index 388a4d2..efe7e37 100644
--- a/src/remake/snapshot.rs
+++ b/src/remake/snapshot.rs
@@ -139,7 +139,7 @@ pub(crate) struct EpochMetadata {
/// Highest sequence number per actor of `previous` contained in the snapshot.
pub(crate) clock: BTreeMap<String, u64>,
pub(crate) policy: Policy,
- /// When the remake was proposed (unix ms): the point the cluster moved on.
+ /// When the remake was proposed (unix ms): the point the swarm moved on.
pub(crate) proposed_at: u64,
/// The remake kind and its translation input, for writes made before the epoch.
pub(crate) kind: String,
@@ -206,7 +206,7 @@ fn parse_metadata(doc: &AutoCommit, generation: u64) -> Result<EpochMetadata, St
/// the same generation. Returns the metadata.
///
/// This does not prove the snapshot's content matches the old epoch; the hash commits
-/// to it, and the peer is a cluster member trusted as much as for ordinary sync.
+/// to it, and the peer is a swarm member trusted as much as for ordinary sync.
pub(crate) fn verify_document(doc: &mut AutoCommit, epoch: Epoch) -> Result<EpochMetadata, String> {
let root = ChangeHash(epoch.id);
let Some(change) = doc.get_change_by_hash(&root) else {
@@ -653,14 +653,14 @@ mod tests {
let policy = json!({});
let mut snap = build(&mut late, &params(&base, &policy)).unwrap();
- // Meanwhile the cluster moved on in the new epoch.
- let mut cluster = snap
+ // Meanwhile the swarm moved on in the new epoch.
+ let mut swarm = snap
.doc
.fork()
- .with_actor(ActorId::from(&b"cluster-node"[..]));
- cluster.put(ROOT, "new", 1_i64).unwrap();
- cluster.commit();
- let bytes = cluster.save();
+ .with_actor(ActorId::from(&b"swarm-node"[..]));
+ swarm.put(ROOT, "new", 1_i64).unwrap();
+ swarm.commit();
+ let bytes = swarm.save();
late.put(ROOT, "mine", "late").unwrap();
late.commit();