diff options
| author | tv <tv@krebsco.de> | 2026-10-24 04:23:38 +0200 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-24 04:47:07 +0200 |
| commit | 6fa188610ce0959e0b61ecaf63f5babf826d2071 (patch) | |
| tree | a955457989abfe4832fe0213b5054d3b34c98ab1 /src/swarm/peer.rs | |
| parent | c2468964b11bd3606f03375c370fd181a1723113 (diff) | |
pull missing changes
Nodes push changes to their neighbours but don't relay them directly.
In a partial mesh, nodes can learn about missing changes via keepalive
messages and can pull them from their neighbours.
Diffstat (limited to 'src/swarm/peer.rs')
| -rw-r--r-- | src/swarm/peer.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/swarm/peer.rs b/src/swarm/peer.rs index a42f5a4..2fd248e 100644 --- a/src/swarm/peer.rs +++ b/src/swarm/peer.rs @@ -133,6 +133,7 @@ async fn note_keepalive(state: &AppState, peer: &str, remote: &transport::Keepal peer_state.syncs_with_us = Some(remote.syncs_with_you); peer_state.reported_heads = remote.heads.heads().map(<[_]>::len); drop(peer_state); + crate::swarm::relay::pull_if_behind(state, peer, remote).await; if became_ready { // We may have left the opening to it while it wasn't ready, and nothing else // would make us look again. |
