diff options
Diffstat (limited to 'src/remake/local.rs')
| -rw-r--r-- | src/remake/local.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/remake/local.rs b/src/remake/local.rs index e13c6fd..cdf2d6f 100644 --- a/src/remake/local.rs +++ b/src/remake/local.rs @@ -66,6 +66,8 @@ struct Inner { /// Remakes this node could have voted for but saw expire first (`vote::cast`), each /// logged once. missed: HashSet<String>, + /// Strict remakes this node won't vote for (`vote::cast`), each logged once. + refused_strict: HashSet<String>, /// The actors this node writes or wrote with in the current document: this run's, /// and those of earlier runs it knows of (`--document-file`). Its own writes, for a /// rejoin. A switch or rejoin starts the list over with the new document's actor, so @@ -232,6 +234,11 @@ impl RemakeState { self.lock().missed.insert(remake.to_owned()) } + /// Notes that this node won't vote for strict remake `remake`: true the first time. + pub(crate) fn refuses_strict(&self, remake: &str) -> bool { + self.lock().refused_strict.insert(remake.to_owned()) + } + fn lock(&self) -> MutexGuard<'_, Inner> { self.inner.lock_or_recover() } |
