[−][src]Trait splinter::consensus::ConsensusEngine
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
fn name(&self) -> &str
The name of the consensus engine
fn version(&self) -> &str
The version of the consensus engine
fn additional_protocols(&self) -> Vec<(String, String)>
Any additional name/version pairs this engine supports
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>
&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>
Run the consensus engine.
Implementors
impl ConsensusEngine for TwoPhaseEngine
[src]
fn name(&self) -> &str
[src]
fn version(&self) -> &str
[src]
fn additional_protocols(&self) -> Vec<(String, String)>
[src]
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>
[src]
&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>