Trait oasis_core_runtime::consensus::roothash::OpenCommitment
source · pub trait OpenCommitment {
// Required methods
fn mostly_equal(&self, other: &Self) -> bool
where Self: Sized;
fn is_indicating_failure(&self) -> bool;
fn to_vote(&self) -> Hash;
fn to_dd_result(&self) -> &dyn Any;
}
Expand description
Verified roothash commitment.
Required Methods§
sourcefn mostly_equal(&self, other: &Self) -> boolwhere
Self: Sized,
fn mostly_equal(&self, other: &Self) -> boolwhere
Self: Sized,
Returns true if the commitment is mostly equal to another specified commitment as per discrepancy detection criteria.
The caller MUST guarantee that the passed commitment is of the same type.
sourcefn is_indicating_failure(&self) -> bool
fn is_indicating_failure(&self) -> bool
Returns true if this commitment indicates a failure.
sourcefn to_vote(&self) -> Hash
fn to_vote(&self) -> Hash
Returns a hash that represents a vote for this commitment as per discrepancy resolution criteria.
sourcefn to_dd_result(&self) -> &dyn Any
fn to_dd_result(&self) -> &dyn Any
Returns a commitment-specific result after discrepancy detection.