Versions in this module Expand all Collapse all v1 v1.0.1 Jun 12, 2023 Changes in this version + type Validators struct + func ArrayToValidators(ids []idx.ValidatorID, weights []Weight) *Validators + func EqualWeightValidators(ids []idx.ValidatorID, weight Weight) *Validators + func (vv *Validators) Builder() ValidatorsBuilder + func (vv *Validators) Copy() *Validators + func (vv *Validators) DecodeRLP(s *rlp.Stream) error + func (vv *Validators) EncodeRLP(w io.Writer) error + func (vv *Validators) Exists(id idx.ValidatorID) bool + func (vv *Validators) Get(id idx.ValidatorID) Weight + func (vv *Validators) GetID(i idx.Validator) idx.ValidatorID + func (vv *Validators) GetIdx(id idx.ValidatorID) idx.Validator + func (vv *Validators) GetWeightByIdx(i idx.Validator) Weight + func (vv *Validators) IDs() []idx.ValidatorID + func (vv *Validators) Idxs() map[idx.ValidatorID]idx.Validator + func (vv *Validators) Len() idx.Validator + func (vv *Validators) Quorum() Weight + func (vv *Validators) SortedIDs() []idx.ValidatorID + func (vv *Validators) SortedWeights() []Weight + func (vv *Validators) TotalWeight() (sum Weight) + func (vv Validators) NewCounter() *WeightCounter + type ValidatorsBigBuilder map[idx.ValidatorID]*big.Int + func NewBigBuilder() ValidatorsBigBuilder + func (vv ValidatorsBigBuilder) Build() *Validators + func (vv ValidatorsBigBuilder) Set(id idx.ValidatorID, weight *big.Int) + func (vv ValidatorsBigBuilder) TotalWeight() *big.Int + type ValidatorsBuilder map[idx.ValidatorID]Weight + func NewBuilder() ValidatorsBuilder + func (vv ValidatorsBuilder) Build() *Validators + func (vv ValidatorsBuilder) Set(id idx.ValidatorID, weight Weight) + type Weight uint32 + type WeightCounter struct + func (s *WeightCounter) Count(v idx.ValidatorID) bool + func (s *WeightCounter) CountByIdx(validatorIdx idx.Validator) bool + func (s *WeightCounter) HasQuorum() bool + func (s *WeightCounter) Sum() Weight + type WeightCounterProvider func() *WeightCounter