Versions in this module Expand all Collapse all v1 v1.0.0 Jul 21, 2022 Changes in this version + type Connector interface + Connected func(id ids.NodeID, nodeVersion version.Application) error + Disconnected func(id ids.NodeID) error + type Manager interface + AddWeight func(ids.ID, ids.NodeID, uint64) error + Contains func(ids.ID, ids.NodeID) bool + GetValidators func(ids.ID) (Set, bool) + MaskValidator func(ids.NodeID) error + RemoveWeight func(ids.ID, ids.NodeID, uint64) error + RevealValidator func(ids.NodeID) error + Set func(ids.ID, Set) error + func NewManager() Manager + type Set interface + AddWeight func(ids.NodeID, uint64) error + Contains func(ids.NodeID) bool + GetWeight func(ids.NodeID) (uint64, bool) + Len func() int + List func() []Validator + MaskValidator func(ids.NodeID) error + PrefixedString func(string) string + RegisterCallbackListener func(SetCallbackListener) + RemoveWeight func(ids.NodeID, uint64) error + RevealValidator func(ids.NodeID) error + Sample func(size int) ([]Validator, error) + Set func([]Validator) error + SubsetWeight func(ids.NodeIDSet) (uint64, error) + Weight func() uint64 + func NewBestSet(expectedSampleSize int) Set + func NewSet() Set + type SetCallbackListener interface + OnValidatorAdded func(validatorID ids.NodeID, weight uint64) + OnValidatorRemoved func(validatorID ids.NodeID, weight uint64) + OnValidatorWeightChanged func(validatorID ids.NodeID, oldWeight, newWeight uint64) + type State interface + GetCurrentHeight func() (uint64, error) + GetMinimumHeight func() (uint64, error) + GetValidatorSet func(height uint64, subnetID ids.ID) (map[ids.NodeID]uint64, error) + func NewLockedState(lock sync.Locker, s State) State + func NewNoState() State + type TestState struct + CantGetCurrentHeight bool + CantGetMinimumHeight bool + CantGetValidatorSet bool + GetCurrentHeightF func() (uint64, error) + GetMinimumHeightF func() (uint64, error) + GetValidatorSetF func(height uint64, subnetID ids.ID) (map[ids.NodeID]uint64, error) + T *testing.T + func (vm *TestState) GetCurrentHeight() (uint64, error) + func (vm *TestState) GetMinimumHeight() (uint64, error) + func (vm *TestState) GetValidatorSet(height uint64, subnetID ids.ID) (map[ids.NodeID]uint64, error) + type Validator interface + ID func() ids.NodeID + Weight func() uint64 + func GenerateRandomValidator(weight uint64) Validator + func NewValidator(nodeID ids.NodeID, weight uint64) Validator v1.0.0-alpha Nov 22, 2022