aboutsummaryrefslogtreecommitdiffstats
path: root/src/simtest/remakes.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-29 03:21:43 +0000
committertv <tv@krebsco.de>2026-11-29 03:21:43 +0000
commite63d30c2581033a85489b10c3f5b252fdbb5049e (patch)
tree5f4e6f65f1cecfb32f841e7ad7d9d106aeb69b20 /src/simtest/remakes.rs
parent9188fa6e13ea7facfab5fb6f55bf26444ec2c01e (diff)
state: plain writes take a view to write, Automerge's are asked for as such
AppState::mutate_doc, mutate_doc_registering and mutate_doc_by hand what they are given a document::view::Write: the member registry, the users, sessions, forgetting and bootstrap write through them, and take whatever kind of document gives it. AppState::mutate_doc_for is for what asks more of an Automerge document than values at paths (the store's API, a remake's host, a store's events), and gives the heads after the write. What reads a view takes one of any size (dyn Write among them).
Diffstat (limited to 'src/simtest/remakes.rs')
-rw-r--r--src/simtest/remakes.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/simtest/remakes.rs b/src/simtest/remakes.rs
index 6fa4235..49139b6 100644
--- a/src/simtest/remakes.rs
+++ b/src/simtest/remakes.rs
@@ -17,7 +17,7 @@ use serde_json::{Value as JsonValue, json};
use super::{SOON, Sim, read, write};
use crate::document::ChangeHash;
use crate::document::replica::Epoch;
-use crate::document::store;
+use crate::document::view;
use crate::remake::testing;
use crate::state::AppState;
use crate::swarm::bootstrap::Start;
@@ -257,7 +257,7 @@ async fn writes_through_a_rejoin_are_kept() {
while !stop.load(Ordering::Relaxed) {
let at = vec!["w".to_owned(), n.to_string()];
let written = c
- .mutate_doc(move |doc| store::write_path(doc, &at, &json!(n)))
+ .mutate_doc(move |doc| view::write_path(doc, &at, &json!(n)))
.await;
assert!(written.is_ok(), "write {n} refused: {written:?}");
answered.lock().unwrap().push(n);