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§
Sourcefn initialize(&self) -> Result<()>
fn initialize(&self) -> Result<()>
Initialize the consensus mechanism
Sourcefn has_consensus(&self) -> Result<bool>
fn has_consensus(&self) -> Result<bool>
Check if the current node has consensus