Function massa_consensus_worker::start_consensus_worker

source ·
pub fn start_consensus_worker(
    config: ConsensusConfig,
    channels: ConsensusChannels,
    init_graph: Option<BootstrapableGraph>,
    storage: Storage,
    massa_metrics: MassaMetrics,
) -> (Box<dyn ConsensusController>, Box<dyn ConsensusManager>)
Expand description

Create a new consensus worker thread.

§Arguments:

  • config: Configuration of the consensus
  • channels: Channels to communicate with others modules
  • init_graph: Optional initial graph to bootstrap the graph. if None, the graph will have only genesis blocks.
  • storage: Storage to use for the consensus

§Returns:

  • The consensus controller to communicate with the consensus worker thread
  • The consensus manager to manage the consensus worker thread