add comment to message_secrets_and_leaves_mut
@@ -674,6 +674,9 @@ impl CoreGroup {
/// Get the message secrets and leaves for the given epoch. Either from the
/// secrets store or from the group.
+ ///
+ /// Note that the leaves vector is empty for message secrets of the current
+ /// epoch. The caller can use treesync in this case.
pub(crate) fn message_secrets_and_leaves_mut<'secret, 'group: 'secret>(
&'group mut self,
epoch: GroupEpoch,
@@ -687,6 +690,8 @@ impl CoreGroup {
))
})
} else {
+ // No need for leaves here. The tree of the current epoch is
+ // available to the caller.
Ok((self.message_secrets_store.message_secrets_mut(), Vec::new()))
}
}
