termincommittee

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const LeanHelixHardMinimumCommitteeMembers = 4

The algorithm cannot function with less committee members because it cannot calculate the f number (where committee members are 3f+1) The only reason to set this manually in config below this limit is for internal tests

View Source
const MaxView = math.MaxUint64

Variables

This section is empty.

Functions

func GetMemberIds added in v0.4.0

func GetMemberIds(members []interfaces.CommitteeMember) []primitives.MemberId

func Str

func Str(memberId primitives.MemberId) string

func ToCommitteeMembersStr

func ToCommitteeMembersStr(members []interfaces.CommitteeMember) string

Deprecated; this is only for logging, use log.StringableSlice instead

Types

type OnInCommitteeCommitCallback

type OnInCommitteeCommitCallback func(ctx context.Context, block interfaces.Block, commitMessages []*interfaces.CommitMessage)

type TermInCommittee

type TermInCommittee struct {
	QuorumWeight uint // TODO primitive
	State        *state.State
	// contains filtered or unexported fields
}

func NewTermInCommittee

func NewTermInCommittee(log L.LHLogger, config *interfaces.Config, state *state.State, messageFactory *messagesfactory.MessageFactory, electionTrigger interfaces.ElectionScheduler, committeeMembers []interfaces.CommitteeMember, prevBlock interfaces.Block, canBeFirstLeader bool, onCommit OnInCommitteeCommitCallback) *TermInCommittee

func (*TermInCommittee) Dispose

func (tic *TermInCommittee) Dispose()

func (*TermInCommittee) HandleCommit

func (tic *TermInCommittee) HandleCommit(cm *interfaces.CommitMessage)

func (*TermInCommittee) HandleNewView

func (tic *TermInCommittee) HandleNewView(nvm *interfaces.NewViewMessage)

func (*TermInCommittee) HandlePrePrepare

func (tic *TermInCommittee) HandlePrePrepare(ppm *interfaces.PreprepareMessage)

func (*TermInCommittee) HandlePrepare

func (tic *TermInCommittee) HandlePrepare(pm *interfaces.PrepareMessage)

func (*TermInCommittee) HandleViewChange

func (tic *TermInCommittee) HandleViewChange(vcm *interfaces.ViewChangeMessage)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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