Trait Consensus

Source
pub trait Consensus: Send + Sync {
    // Required methods
    fn initialize(&self) -> Result<()>;
    fn has_consensus(&self) -> Result<bool>;
}
Expand description

Base trait for consensus mechanisms

Required Methods§

Source

fn initialize(&self) -> Result<()>

Initialize the consensus mechanism

Source

fn has_consensus(&self) -> Result<bool>

Check if the current node has consensus

Implementors§