diff --git a/node/libs/roles/src/validator/messages/consensus.rs b/node/libs/roles/src/validator/messages/consensus.rs index 2463b1d1..8f6004ee 100644 --- a/node/libs/roles/src/validator/messages/consensus.rs +++ b/node/libs/roles/src/validator/messages/consensus.rs @@ -191,6 +191,9 @@ impl PrepareQC { } /// Add a validator's signed message. + /// * `signed_message` - A valid signed `ReplicaPrepare` message. + /// * `validator_index` - The signer index in the validator set. + /// * `validator_set` - The validator set. pub fn add( &mut self, signed_message: &Signed, @@ -292,6 +295,8 @@ impl CommitQC { } /// Add a validator's signature. + /// * `sig` - A valid signature. + /// * `validator_index` - The signer index in the validator set. pub fn add(&mut self, sig: &Signature, validator_index: usize) { self.signers.0.set(validator_index, true); self.signature.add(sig); diff --git a/node/libs/roles/src/validator/testonly.rs b/node/libs/roles/src/validator/testonly.rs index 72b281c2..f8effd9c 100644 --- a/node/libs/roles/src/validator/testonly.rs +++ b/node/libs/roles/src/validator/testonly.rs @@ -109,6 +109,8 @@ impl PrepareQC { impl CommitQC { /// Creates a new CommitQC from a list of *signed* replica Commit messages and the current validator set. + /// * `signed_messages` - A list of valid `ReplicaCommit` signed messages. Must contain at least one item. + /// * `validators` - The validator set. pub fn from( signed_messages: &[Signed], validators: &ValidatorSet,