aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/lib.rs b/src/lib.rs
index d4989ab..b57f6a5 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -225,21 +225,20 @@ pub async fn run() -> Result<()> {
// or from the root.
#[cfg(feature = "federation")]
let set = match (&store, &args.store_document) {
- (Some(store), Some(path)) => Some(
- store.set(
- path,
- &files,
- args.store_checkpoint
- .as_deref()
- .and_then(federation::store::Id::from_hex),
- args.store_keeps_forgotten,
- )?,
- ),
+ (Some(store), Some(path)) => store.set(
+ path,
+ &files,
+ args.store_checkpoint
+ .as_deref()
+ .and_then(federation::store::Id::from_hex),
+ args.store_keeps_forgotten,
+ args.store_both,
+ )?,
_ => None,
};
#[cfg(feature = "federation")]
let starting = match &store {
- Some(store) if set.is_none() => {
+ Some(store) if set.is_none() || args.store_both => {
store.starting(starting, remembered.as_ref().map(|r| r.swarm_id.as_str()))?
}
// A set is the store's document: the one a swarm syncs otherwise stays empty.
@@ -400,6 +399,7 @@ pub async fn run() -> Result<()> {
)?
.near(args.store_neighbour_parties.clone())
.voting(voter(args)?)
+ .of_both_if(args.store_both, args.store_keeps_forgotten)
.carrying_if(set, args.store_document.clone(), Arc::clone(&files)),
strict_keys: args
.strict_keys