aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/sync.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-31 05:21:24 +0100
committertv <tv@krebsco.de>2026-10-31 05:21:24 +0100
commit76e91dfc62bc76228df8c07abf6e012e777c4eca (patch)
treef18969ece31637f27faaa6c5e6454c8645f51d9d /src/swarm/sync.rs
parentfbbb45e88f067ff9f6c7c6b5dd9f5b41d202da7e (diff)
unify usage of is_dormant
Diffstat (limited to 'src/swarm/sync.rs')
-rw-r--r--src/swarm/sync.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/swarm/sync.rs b/src/swarm/sync.rs
index b34c20b..51144ac 100644
--- a/src/swarm/sync.rs
+++ b/src/swarm/sync.rs
@@ -11,7 +11,7 @@ use tokio::time::Instant;
use tracing::{debug, info, trace, warn};
use crate::locks::MutexExt;
-use crate::state::{AppState, Liveness, PeerState, Standing};
+use crate::state::{AppState, PeerState, Standing};
use crate::swarm::peer::{peer_swarm, send_hello_once};
use crate::swarm::source;
use crate::swarm::throughput::SyncBytes;
@@ -42,7 +42,7 @@ async fn deliver_sync_to_peer(state: &AppState, peer: &str) -> Result<()> {
let validated_swarm = {
let peer_state = peer_state_mutex.lock().await;
- if matches!(peer_state.liveness, Liveness::Dormant { .. }) {
+ if peer_state.liveness.is_dormant() {
// Reactivation re-handshakes, and PeerValidated then restarts sync.
trace!("Skipping sync with dormant peer");
return Ok(());