aboutsummaryrefslogtreecommitdiffstats
path: root/src/simtest/holding.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-17 11:44:37 +0000
committertv <tv@krebsco.de>2026-11-17 12:46:35 +0100
commitcf6cb0d4e92e4a2f6ae373eca0197ac4f5e77e8f (patch)
tree9798930488711500aecb4051d4183ef4801d85b7 /src/simtest/holding.rs
parentbe8518f1c69158e3ac4c1501fea027854cc45d13 (diff)
simtest: d, serving a higher made-up epoch, is apart from the others
Reaching the others, d rejoins their epoch, the lower, as any node holding a store does, and e, reaching only d, finds their epoch there, not d's. Cut off from them, d stays on the one it made up.
Diffstat (limited to 'src/simtest/holding.rs')
-rw-r--r--src/simtest/holding.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/simtest/holding.rs b/src/simtest/holding.rs
index a7fc116..e1336bc 100644
--- a/src/simtest/holding.rs
+++ b/src/simtest/holding.rs
@@ -1409,8 +1409,9 @@ async fn store_attack_30() {
/// A swarm on the epoch of a compaction whose snapshot holds a checkpoint, and d, of
/// makefu, serving an epoch of that generation it made up, of a `lower` ID or a higher,
/// whose snapshot holds the root and tv's write alone, as the document stood before the
-/// checkpoint: the simulation, its nodes (a, b, c, d), the federation's first version
-/// and ID, tv's write, and the two epochs.
+/// checkpoint; of a higher, apart from the others, whose epoch it would rejoin: the
+/// simulation, its nodes (a, b, c, d), the federation's first version and ID, tv's
+/// write, and the two epochs.
async fn made_up_epoch(
seed: u64,
lower: bool,
@@ -1501,6 +1502,12 @@ async fn made_up_epoch(
.expect("an epoch");
let lower = made_up.epoch;
assert!(events::checkpoint(&made_up.doc).is_none());
+ if made_up.epoch.id > honest.id {
+ for other in ["a", "b", "c"] {
+ cut(&sim, "d", other, true);
+ cut(&sim, other, "d", true);
+ }
+ }
crate::remake::testing::serve(&nodes[3], lower, made_up.doc).await;
(sim, nodes, first, id, head, honest, lower)
}