[][src]Struct finality_grandpa::CommitValidationResult

pub struct CommitValidationResult<H, N> { /* fields omitted */ }

Struct returned from validate_commit function with information about the validation result.

Methods

impl<H, N> CommitValidationResult<H, N>[src]

pub fn ghost(&self) -> Option<&(H, N)>[src]

Returns the commit GHOST i.e. the block with highest number for which the cumulative votes of descendents and itself reach finalization threshold.

pub fn num_precommits(&self) -> usize[src]

Returns the number of precommits in the commit.

pub fn num_duplicated_precommits(&self) -> usize[src]

Returns the number of duplicate precommits in the commit.

pub fn num_equivocations(&self) -> usize[src]

Returns the number of equivocated precommits in the commit.

pub fn num_invalid_voters(&self) -> usize[src]

Returns the number of invalid voters in the commit.

Trait Implementations

impl<H, N> Default for CommitValidationResult<H, N>[src]

impl<H, N> From<CommitValidationResult<H, N>> for BadCommit[src]

Auto Trait Implementations

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

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Erased for T