Struct finality_grandpa::CommitValidationResult
source · pub struct CommitValidationResult { /* private fields */ }
Expand description
Struct returned from validate_commit
function with information
about the validation result.
Implementations§
source§impl CommitValidationResult
impl CommitValidationResult
sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Returns true
if the commit is valid, which implies that the target
block in the commit is finalized.
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, i.e. votes from identities that are not part of the voter set.
Trait Implementations§
source§impl Debug for CommitValidationResult
impl Debug for CommitValidationResult
source§impl Default for CommitValidationResult
impl Default for CommitValidationResult
source§fn default() -> CommitValidationResult
fn default() -> CommitValidationResult
Returns the “default value” for a type. Read more
source§impl From<CommitValidationResult> for BadCommit
impl From<CommitValidationResult> for BadCommit
source§fn from(r: CommitValidationResult) -> Self
fn from(r: CommitValidationResult) -> Self
Converts to this type from the input type.