Struct linera_chain::data_types::SignatureAggregator
source · pub struct SignatureAggregator<'a> { /* private fields */ }
Implementations§
source§impl<'a> SignatureAggregator<'a>
impl<'a> SignatureAggregator<'a>
sourcepub fn new(value: HashedValue, round: Round, committee: &'a Committee) -> Self
pub fn new(value: HashedValue, round: Round, committee: &'a Committee) -> Self
Starts aggregating signatures for the given value into a certificate.
sourcepub fn append(
&mut self,
validator: ValidatorName,
signature: Signature
) -> Result<Option<Certificate>, ChainError>
pub fn append( &mut self, validator: ValidatorName, signature: Signature ) -> Result<Option<Certificate>, ChainError>
Tries to append a signature to a (partial) certificate. Returns Some(certificate) if a
quorum was reached. The resulting final certificate is guaranteed to be valid in the sense
of check
below. Returns an error if the signed value cannot be aggregated.
Auto Trait Implementations§
impl<'a> Freeze for SignatureAggregator<'a>
impl<'a> RefUnwindSafe for SignatureAggregator<'a>
impl<'a> Send for SignatureAggregator<'a>
impl<'a> Sync for SignatureAggregator<'a>
impl<'a> Unpin for SignatureAggregator<'a>
impl<'a> UnwindSafe for SignatureAggregator<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more