Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyEventFn ¶
type BeginBlockFn ¶
type BeginBlockFn func(block *Block) BlockCallbacks
type BlockCallbacks ¶
type BlockCallbacks struct { // ApplyEvent is called on confirmation of each event during block processing. // Cannot be called twice for the same event. // The order in which ApplyBlock is called for events is deterministic but undefined. It's application's responsibility to sort events according to its needs. // It's application's responsibility to interpret this data (e.g. events may be related to batches of transactions or other ordered data). ApplyEvent ApplyEventFn // EndBlock indicates that ApplyEvent was called for all the events // Returns validators group for a new epoch, if epoch must be sealed after this bock // If epoch must not get sealed, then this callback must return nil EndBlock EndBlockFn }
type Cheaters ¶
type Cheaters []idx.ValidatorID
Cheaters is a slice type for storing cheaters list.
func (Cheaters) Set ¶
func (s Cheaters) Set() map[idx.ValidatorID]struct{}
Set returns map of cheaters
type Consensus ¶
type Consensus interface { // PushEvent takes event for processing. Process(e dag.Event) error // Build sets consensus fields. Returns an error if event should be dropped. Build(e dag.MutableEvent) error }
Consensus is a consensus interface.
type ConsensusCallbacks ¶
type ConsensusCallbacks struct { // BeginBlock returns further callbacks for processing of this block BeginBlock BeginBlockFn }
ConsensusCallbacks contains callbacks called during block processing by consensus engine
type EndBlockFn ¶
type EndBlockFn func() (sealEpoch *pos.Validators)
Click to show internal directories.
Click to hide internal directories.