tendermint::trust_threshold

Trait TrustThreshold

Source
pub trait TrustThreshold:
    Copy
    + Clone
    + Debug
    + Serialize
    + DeserializeOwned {
    // Required method
    fn is_enough_power(
        &self,
        signed_voting_power: u64,
        total_voting_power: u64,
    ) -> bool;
}
Expand description

TrustThreshold defines how much of the total voting power of a known and trusted validator set is sufficient for a commit to be accepted going forward.

Required Methods§

Source

fn is_enough_power( &self, signed_voting_power: u64, total_voting_power: u64, ) -> bool

Check whether the given signed voting power is sufficient according to this trust threshold against the given total voting power.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§