consensus

package
v0.0.0-...-05bc493 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Selection

type Selection interface {
	/* When false - disables chasing timeout */
	CanBeImproved() bool
	/* This bitset only allows values of NbsConsensus[*] */
	GetConsensusVector() nodeset.ConsensusBitsetRow
}

func NewSelection

func NewSelection(canBeImproved bool, bitset nodeset.ConsensusBitsetRow) Selection

type SelectionStrategy

type SelectionStrategy interface {
	CanStartVectorsEarly(consensusMembers int, countFraud int, countTrustBySome int, countTrustByNeighbors int) bool
	/* Result can be nil - it means no-decision */
	TrySelectOnAdded(globulaStats *nodeset.ConsensusStatTable, addedNode profiles.StaticProfile,
		nodeStats *nodeset.ConsensusStatRow) Selection
	SelectOnStopped(globulaStats *nodeset.ConsensusStatTable, timeIsOut bool, bftMajority int) Selection
}

type SelectionStrategyFactory

type SelectionStrategyFactory interface {
	CreateSelectionStrategy(aggressivePhasing bool) SelectionStrategy
}

func NewSimpleSelectionStrategyFactory

func NewSimpleSelectionStrategyFactory() SelectionStrategyFactory

Jump to

Keyboard shortcuts

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