diff options
| author | tv <tv@krebsco.de> | 2026-10-31 05:21:24 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-31 05:21:24 +0100 |
| commit | ba64c49fda6f2b4c9eb91eb3d311bdf9b9b98954 (patch) | |
| tree | f4b520b4eb5b8da89d01bfe7efe38c97c69223a0 /src/swarm/sync.rs | |
| parent | 20b0be670d3798d63ccf36d0fb014c64e7b729b7 (diff) | |
unify usage of is_dormant
Diffstat (limited to 'src/swarm/sync.rs')
| -rw-r--r-- | src/swarm/sync.rs | 4 |
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(()); |
