Struct finality_grandpa::CommitValidationResult
source · [−]pub struct CommitValidationResult<H, N> { /* private fields */ }
Expand description
Struct returned from validate_commit
function with information
about the validation result.
Implementations
sourceimpl<H, N> CommitValidationResult<H, N>
impl<H, N> CommitValidationResult<H, N>
sourcepub fn ghost(&self) -> Option<&(H, N)>
pub fn ghost(&self) -> Option<&(H, N)>
Returns the commit GHOST i.e. the block with highest number for which the cumulative votes of descendents and itself reach finalization threshold.
sourcepub fn num_precommits(&self) -> usize
pub fn num_precommits(&self) -> usize
Returns the number of precommits in the commit.
sourcepub fn num_duplicated_precommits(&self) -> usize
pub fn num_duplicated_precommits(&self) -> usize
Returns the number of duplicate precommits in the commit.
sourcepub fn num_equivocations(&self) -> usize
pub fn num_equivocations(&self) -> usize
Returns the number of equivocated precommits in the commit.
sourcepub fn num_invalid_voters(&self) -> usize
pub fn num_invalid_voters(&self) -> usize
Returns the number of invalid voters in the commit.
Trait Implementations
sourceimpl<H, N> Default for CommitValidationResult<H, N>
impl<H, N> Default for CommitValidationResult<H, N>
sourceimpl<H, N> From<CommitValidationResult<H, N>> for BadCommit
impl<H, N> From<CommitValidationResult<H, N>> for BadCommit
sourcefn from(r: CommitValidationResult<H, N>) -> Self
fn from(r: CommitValidationResult<H, N>) -> Self
Performs the conversion.
Auto Trait Implementations
impl<H, N> RefUnwindSafe for CommitValidationResult<H, N> where
H: RefUnwindSafe,
N: RefUnwindSafe,
impl<H, N> Send for CommitValidationResult<H, N> where
H: Send,
N: Send,
impl<H, N> Sync for CommitValidationResult<H, N> where
H: Sync,
N: Sync,
impl<H, N> Unpin for CommitValidationResult<H, N> where
H: Unpin,
N: Unpin,
impl<H, N> UnwindSafe for CommitValidationResult<H, N> where
H: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more