summaryrefslogtreecommitdiffstats
path: root/src/remake/switch.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/remake/switch.rs')
-rw-r--r--src/remake/switch.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/remake/switch.rs b/src/remake/switch.rs
index f4a018a..e9f49ee 100644
--- a/src/remake/switch.rs
+++ b/src/remake/switch.rs
@@ -32,6 +32,7 @@ use super::local::LocalStatus;
use super::quarantine;
use super::records::{self, EpochRecord, Record, unix_millis};
use super::snapshot::{self, META_ROOT, REMAKES};
+use super::vote;
use crate::document::replica::Epoch;
use crate::document::store;
use crate::swarm::sync::paths_related;
@@ -78,6 +79,8 @@ async fn check<H: Host>(host: &H) {
return catchup::check(host).await;
}
+ vote::cast(host).await;
+
let all = host.read_doc(records::load_all).await;
let local_record = EpochRecord::from(local);
@@ -93,7 +96,7 @@ async fn check<H: Host>(host: &H) {
[] => return catchup::check(host).await,
[(id, record)] => (id.clone(), record.clone()),
several => {
- // The settle protocol prevents this; never guess which one is right. Peers
+ // Majority voting prevents this; never guess which one is right. Peers
// that did switch can still be followed.
let ids: Vec<&str> = several.iter().map(|(id, _)| id.as_str()).collect();
error!(remakes = ?ids, "Several remakes committed for this epoch; not switching on my own");