Documentation ¶
Index ¶
- Variables
- type Handler
- func (b *Handler) AmMember(round uint64, step uint8, maxSize int) bool
- func (b *Handler) Committee(round uint64, step uint8, maxSize int) user.VotingCommittee
- func (b *Handler) CommitteeSize(round uint64, maxSize int) int
- func (b *Handler) IsMember(pubKeyBLS []byte, round uint64, step uint8, maxSize int) bool
- func (b *Handler) VotesFor(pubKeyBLS []byte, round uint64, step uint8, maxSize int) int
Constants ¶
This section is empty.
Variables ¶
View Source
var PregenerationAmount uint8 = 8
PregenerationAmount is the size of a pregenerated committee.
Functions ¶
This section is empty.
Types ¶
type Handler ¶ added in v0.2.0
type Handler struct { key.Keys Provisioners user.Provisioners Committees []user.VotingCommittee // contains filtered or unexported fields }
Handler is injected in the consensus components that work with the various committee. It generates and maintains a list of active and valid committee members and handle the votes.
func NewHandler ¶ added in v0.2.0
func NewHandler(keys key.Keys, p user.Provisioners) *Handler
NewHandler creates a new committee.Handler by instantiating the committee slice, setting the keys and setting the Provisioner set.
func (*Handler) AmMember ¶ added in v0.2.0
AmMember checks if we are part of the committee for a given round and step.
func (*Handler) Committee ¶ added in v0.2.0
Committee returns a VotingCommittee for a given round and step.
func (*Handler) CommitteeSize ¶ added in v0.2.0
CommitteeSize returns the size of a VotingCommittee, depending on how many provisioners are in the set.
Click to show internal directories.
Click to hide internal directories.