From de560ee34ba0297194cae6ac9a1966e3ef614945 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 23 Oct 2026 22:25:41 +0200 Subject: 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. --- src/state.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/state.rs') 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, + + /// How many heads its most recent keepalive listed (None if it sent a digest). + pub(crate) reported_heads: Option, } /// 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, } } -- cgit v1.3.1