Fix random_value doc comment.

This commit is contained in:
Andreas Fackler 2018-11-12 14:01:37 +01:00 committed by Andreas Fackler
parent 30cce9bed8
commit 767944c0f6
2 changed files with 10 additions and 4 deletions

View File

@ -125,8 +125,11 @@ impl<C, N: NodeIdT> Batch<C, N> {
&& self.encryption_schedule == other.encryption_schedule
}
/// Returns the signature that can be used as a pseudorandom value: None of the validators knew
/// its value before the other of the batch were decided.
/// Returns the signature that can be used as a pseudorandom value.
///
/// This value was only revealed to the validators after the set of contributions had been
/// decided. None of the validators knew it when they could still influence the contents of the
/// batch.
///
/// If the `random_value` option is `false` (default), this is `None`.
pub fn random_value(&self) -> Option<&Signature> {

View File

@ -10,8 +10,11 @@ pub struct Batch<C, N> {
pub epoch: u64,
/// The set of agreed contributions, by the contributor's node ID.
pub contributions: BTreeMap<N, C>,
/// The signature that can be used as a pseudorandom value: None of the validators knew
/// its value before the other of the batch were decided.
/// The signature that can be used as a pseudorandom value.
///
/// This value was only revealed to the validators after the set of contributions had been
/// decided. None of the validators knew it when they could still influence the contents of the
/// batch.
///
/// If the `random_value` option is `false` (default), this is `None`.
pub random_value: Option<Signature>,