summaryrefslogtreecommitdiffstats
path: root/src/state.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-24 13:09:22 +0200
committertv <tv@krebsco.de>2026-10-24 13:09:22 +0200
commit1df85d13453b717dbee8f4ebf47b87de4f647866 (patch)
treee86df90da61f74320c99aa5b19f5871c6918f09d /src/state.rs
parentc852ea8478963f5298e5b186ca5e1d7284504fd1 (diff)
introduce majority voting on remakes
Diffstat (limited to 'src/state.rs')
-rw-r--r--src/state.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/state.rs b/src/state.rs
index 25c734e..a47211f 100644
--- a/src/state.rs
+++ b/src/state.rs
@@ -1022,6 +1022,10 @@ impl Host for AppState {
self.timing.dormant_after
}
+ fn electorate(&self, doc: &AutoCommit, now_ms: u64) -> Vec<String> {
+ crate::swarm::members::electorate(doc, now_ms, self.electorate_window)
+ }
+
fn is_node_ready(&self) -> impl Future<Output = bool> + Send {
let state = self.clone();
async move { state.is_ready().await }