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.