Documentation ¶
Index ¶
- type Option
- type ValidatorsMap
- func (vm *ValidatorsMap) CreateValidator(pubKey string, v *validator.Validator)
- func (vm *ValidatorsMap) ForEach(iterator validatorIterator) bool
- func (vm *ValidatorsMap) GetAll() []*validator.Validator
- func (vm *ValidatorsMap) GetValidator(pubKey string) (*validator.Validator, bool)
- func (vm *ValidatorsMap) RemoveValidator(pubKey string) *validator.Validator
- func (vm *ValidatorsMap) Size() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ValidatorsMap ¶
type ValidatorsMap struct {
// contains filtered or unexported fields
}
ValidatorsMap manages a collection of running validators
func (*ValidatorsMap) CreateValidator ¶
func (vm *ValidatorsMap) CreateValidator(pubKey string, v *validator.Validator)
CreateValidator creates a new validator instance TODO: pass spectypes.ValidatorPK instead of string
func (*ValidatorsMap) ForEach ¶
func (vm *ValidatorsMap) ForEach(iterator validatorIterator) bool
ForEach loops over validators
func (*ValidatorsMap) GetAll ¶
func (vm *ValidatorsMap) GetAll() []*validator.Validator
GetAll returns all validators.
func (*ValidatorsMap) GetValidator ¶
func (vm *ValidatorsMap) GetValidator(pubKey string) (*validator.Validator, bool)
GetValidator returns a validator TODO: pass spectypes.ValidatorPK instead of string
func (*ValidatorsMap) RemoveValidator ¶
func (vm *ValidatorsMap) RemoveValidator(pubKey string) *validator.Validator
RemoveValidator removes a validator instance from the map TODO: pass spectypes.ValidatorPK instead of string
func (*ValidatorsMap) Size ¶
func (vm *ValidatorsMap) Size() int
Size returns the number of validators in the map
Click to show internal directories.
Click to hide internal directories.