diff options
Diffstat (limited to 'src/swarm/bootstrap.rs')
| -rw-r--r-- | src/swarm/bootstrap.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/swarm/bootstrap.rs b/src/swarm/bootstrap.rs index 53b4af8..27b5e6b 100644 --- a/src/swarm/bootstrap.rs +++ b/src/swarm/bootstrap.rs @@ -26,7 +26,7 @@ use uuid::Uuid; use crate::document; use crate::document::meta::{self, SWARM}; use crate::document::replica::Epoch; -use crate::document::store; +use crate::document::view; use crate::document::{ActorId, Document}; use crate::files::{FileKind, Files}; use crate::force::Force; @@ -115,19 +115,19 @@ pub(crate) async fn bootstrap(state: &AppState, seeds: &[String], start: Start) state .mutate_doc(move |doc| { for (path, entry) in &users { - store::write_path(doc, path, entry)?; + view::write_path(doc, path, entry)?; } if let Some(policy) = &policy { - store::write_path(doc, &crate::access::policy::path(), policy)?; + view::write_path(doc, &crate::access::policy::path(), policy)?; } - store::write_path(doc, &swarm_id_path(), &recorded)?; - store::write_path( + view::write_path(doc, &swarm_id_path(), &recorded)?; + view::write_path( doc, &crate::swarm::topology::neighbours_path(), &JsonValue::from(neighbours), )?; - store::write_path(doc, &crate::swarm::topology::topology_path(), &topology)?; - store::write_path( + view::write_path(doc, &crate::swarm::topology::topology_path(), &topology)?; + view::write_path( doc, &crate::swarm::topology::dissemination_path(), &dissemination, @@ -247,7 +247,7 @@ fn swarm_id_path() -> Vec<String> { /// The swarm ID the document names, if any. fn read_swarm_id(doc: &Document) -> Option<String> { - match store::read_path(doc, &swarm_id_path()) { + match view::read_path(doc, &swarm_id_path()) { Ok(Some(JsonValue::String(id))) if !id.is_empty() => Some(id), _ => None, } |
