diff options
| author | tv <tv@krebsco.de> | 2026-10-24 16:18:58 +0200 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-24 16:18:58 +0200 |
| commit | 371e52cb48bae99232547f6fae6a0487a85c2d04 (patch) | |
| tree | d0222c1f7f727322525fc04772297437fd349f77 /src/swarm/sync.rs | |
| parent | eb9cc70985a27fe16788a885b854fb514234c43a (diff) | |
add chunked download and use it during rejoin
Diffstat (limited to 'src/swarm/sync.rs')
| -rw-r--r-- | src/swarm/sync.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/swarm/sync.rs b/src/swarm/sync.rs index 3284015..58a08db 100644 --- a/src/swarm/sync.rs +++ b/src/swarm/sync.rs @@ -32,6 +32,12 @@ pub(crate) struct ChangeSet { } async fn deliver_sync_to_peer(state: &AppState, peer: &str) -> Result<()> { + if state.remake.fetching_snapshot() { + // Rejoining: the snapshot comes as a download, not in a sync message. Sync + // starts once it is here (`remake::catchup`). + trace!("Waiting for the snapshot download; not syncing yet"); + return Ok(()); + } let Some(peer_state_mutex) = state.get_peer_state(peer).await else { trace!("Peer was forgotten; skipping synchronization"); return Ok(()); |
