diff options
| author | tv <tv@krebsco.de> | 2026-10-24 04:23:38 +0200 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-24 04:23:38 +0200 |
| commit | f1ef24f38b83bad372e07d4db5533611fa3f6ab4 (patch) | |
| tree | 8a8bc676f83719b7f86e1b3d75ddd0399f4d2308 /src/state.rs | |
| parent | 57346d0ec8126471a69928df952a1a1f0c36ae33 (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/state.rs')
| -rw-r--r-- | src/state.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/state.rs b/src/state.rs index 7574e35..10471df 100644 --- a/src/state.rs +++ b/src/state.rs @@ -536,6 +536,8 @@ pub(crate) struct AppState { /// Target number of neighbours (`--neighbours`); up to this many + 1 members the /// swarm is a full mesh. pub(crate) neighbours_k: usize, + /// The neighbour we are pulling changes from, and since when (`swarm::relay`). + pub(crate) pulling: Arc<std::sync::Mutex<Option<(String, Instant)>>>, /// Our neighbours, once known (`swarm::topology`). pub(crate) neighbours: Arc<std::sync::RwLock<Option<crate::swarm::topology::NeighbourView>>>, |
