Documentation ¶
Index ¶
- Constants
- func GetMemberIds(members []interfaces.CommitteeMember) []primitives.MemberId
- func Str(memberId primitives.MemberId) string
- func ToCommitteeMembersStr(members []interfaces.CommitteeMember) string
- type OnInCommitteeCommitCallback
- type TermInCommittee
- func (tic *TermInCommittee) Dispose()
- func (tic *TermInCommittee) HandleCommit(cm *interfaces.CommitMessage)
- func (tic *TermInCommittee) HandleNewView(nvm *interfaces.NewViewMessage)
- func (tic *TermInCommittee) HandlePrePrepare(ppm *interfaces.PreprepareMessage)
- func (tic *TermInCommittee) HandlePrepare(pm *interfaces.PrepareMessage)
- func (tic *TermInCommittee) HandleViewChange(vcm *interfaces.ViewChangeMessage)
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)
Click to show internal directories.
Click to hide internal directories.