run

package
v0.0.0-...-fc88c08 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package run defines API for running the whole consensus protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NoBeacon

func NoBeacon(conf config.Config, ds core.DataSource, ps core.PreblockSink) (func(), func(), error)

NoBeacon is a counterpart of Process that does not perform the setup phase. Instead, a fixed seeded WeakThresholdKey is used for the main consensus. NoBeacon should be used for testing purposes only! Returns start and stop functions.

func Process

func Process(setupConf, conf config.Config, ds core.DataSource, ps core.PreblockSink) (start func(), stop func(), err error)

Process is the main external API of consensus-go. Given two Config objects (one for the setup phase and one for the main consensus), data source and preblock sink, Process initializes two orderers and a channel between them used to pass the result of the setup phase. Returns two functions that can be used to, respectively, start and stop the whole system. The provided preblock sink gets closed after Process produces the last preblock.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL