aboutsummaryrefslogtreecommitdiffstats
path: root/src/state/host.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-31 03:49:56 +0100
committertv <tv@krebsco.de>2026-10-31 03:49:56 +0100
commit884893244138d35d9dd3d07ef14b5543c6ee2117 (patch)
treea85175778e018057043db6e19f3062d20ab0487e /src/state/host.rs
parent725110193bf2d8acc43a6951decc75d155352a46 (diff)
unify sync_on predicate
Diffstat (limited to 'src/state/host.rs')
-rw-r--r--src/state/host.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/state/host.rs b/src/state/host.rs
index ee67b80..04b328c 100644
--- a/src/state/host.rs
+++ b/src/state/host.rs
@@ -41,10 +41,8 @@ impl AppState {
let mut peer_state = peer_state_mutex.lock().await;
// What it said about syncing with us was about our old epoch.
peer_state.syncs_with_us = None;
- let gets_our_opening = !peer_state.liveness.is_dormant()
- && matches!(peer_state.standing, Standing::Member { .. })
- && peer_state.epoch == Some(local)
- && peer_state.reports_ready == Some(true);
+ let gets_our_opening =
+ peer_state.syncs_on(local) && peer_state.reports_ready == Some(true);
if !gets_our_opening {
announce.push(id);
}