pub trait ConsensusEngine: Send {
    fn name(&self) -> &str;
    fn version(&self) -> &str;
    fn additional_protocols(&self) -> Vec<(String, String)>Notable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
    A: Allocator
; fn run(
        &mut self,
        consensus_messages: Receiver<ConsensusMessage>,
        proposal_updates: Receiver<ProposalUpdate>,
        network_sender: Box<dyn ConsensusNetworkSender>,
        proposal_manager: Box<dyn ProposalManager>,
        startup_state: StartupState
    ) -> Result<(), ConsensusEngineError>; }
Expand description

Consensus algorithms are implemented as consensus engines. The ConsensusEngine interface defines how consensus algorithms are identified (name, version, and supported protocols), as well as how they are run and what values are required for running.

Required Methods

The name of the consensus engine

The version of the consensus engine

Any additional name/version pairs this engine supports

Run the consensus engine.

Implementors