From 1f3be9d059876f7f3994056b1ac8ce307628a52a Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2026 19:35:20 +0100 Subject: document: allow writes during rejoin --- src/document/file.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/document/file.rs') diff --git a/src/document/file.rs b/src/document/file.rs index 9efae42..3ea3afd 100644 --- a/src/document/file.rs +++ b/src/document/file.rs @@ -197,6 +197,11 @@ impl DocumentFile { /// What is due for a document of `epoch` at `heads`, written by this node's `actors` /// (see the module docs). + /// How many of this node's actors the file holds; None before it was written. + pub(crate) fn actors(&self) -> Option { + self.lock().as_ref().map(|written| written.actors) + } + pub(crate) fn due(&self, epoch: Epoch, actors: usize, heads: &[ChangeHash]) -> Due { let written = self.lock().clone(); let reason = match &written { -- cgit v1.3.1