summaryrefslogtreecommitdiffstats
path: root/src/state.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-23 22:25:41 +0200
committertv <tv@krebsco.de>2026-10-23 22:25:41 +0200
commitde560ee34ba0297194cae6ac9a1966e3ef614945 (patch)
tree58dbdef0c2be5b747991c712c126271bc8ef692a /src/state.rs
parentd8f0933b5c88634ee7e83b435241084baa6abf5b (diff)
bump number of heads in keepalive messages
Instead of arbitrarily limiting the number to 16, allow filling keepalive messages as long as they don't cause mycelium to chunk it.
Diffstat (limited to 'src/state.rs')
-rw-r--r--src/state.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/state.rs b/src/state.rs
index 8ff8b9d..4d82150 100644
--- a/src/state.rs
+++ b/src/state.rs
@@ -126,6 +126,9 @@ pub(crate) struct PeerState {
/// Whether the peer said, in its most recent keepalive, that it would sync with us.
pub(crate) syncs_with_us: Option<bool>,
+
+ /// How many heads its most recent keepalive listed (None if it sent a digest).
+ pub(crate) reported_heads: Option<usize>,
}
/// One Automerge sync with a peer, from a reset to the next. Everything a reset must
@@ -330,6 +333,7 @@ impl PeerState {
epoch: None,
reports_ready: None,
syncs_with_us: None,
+ reported_heads: None,
}
}