pub enum CommitSig {
BlockIdFlagAbsent,
BlockIdFlagCommit {
validator_address: Id,
timestamp: Time,
signature: Option<Signature>,
},
BlockIdFlagNil {
validator_address: Id,
timestamp: Time,
signature: Option<Signature>,
},
}
Expand description
CommitSig represents a signature of a validator. It’s a part of the Commit and can be used to reconstruct the vote set given the validator set.
Variants§
BlockIdFlagAbsent
no vote was received from a validator.
BlockIdFlagCommit
voted for the Commit.BlockID.
Fields
BlockIdFlagNil
voted for nil.
Implementations§
Source§impl CommitSig
impl CommitSig
Sourcepub fn validator_address(&self) -> Option<Id>
pub fn validator_address(&self) -> Option<Id>
Get the address of this validator if a vote was received.
Sourcepub fn is_absent(&self) -> bool
pub fn is_absent(&self) -> bool
Whether this signature is absent (no vote was received from validator)
Trait Implementations§
impl Eq for CommitSig
impl StructuralPartialEq for CommitSig
Auto Trait Implementations§
impl Freeze for CommitSig
impl RefUnwindSafe for CommitSig
impl Send for CommitSig
impl Sync for CommitSig
impl Unpin for CommitSig
impl UnwindSafe for CommitSig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)