Documentation ¶
Index ¶
- type Validator
- func (val *Validator) AddToStake(amt uint64) error
- func (val *Validator) Address() crypto.Address
- func (val *Validator) BondingHeight() uint64
- func (val *Validator) Decode(bs []byte) error
- func (val Validator) Encode() ([]byte, error)
- func (val *Validator) IncSequence()
- func (val *Validator) Marshal() ([]byte, error)
- func (val Validator) MarshalJSON() ([]byte, error)
- func (val *Validator) MarshalTo(data []byte) (int, error)
- func (val Validator) MinimumStakeToUnbond() uint64
- func (val Validator) Power() int64
- func (val *Validator) PublicKey() crypto.PublicKey
- func (val *Validator) Sequence() uint64
- func (val *Validator) Size() int
- func (val *Validator) Stake() uint64
- func (val Validator) String() string
- func (val *Validator) SubtractFromStake(amt uint64) error
- func (val *Validator) Unmarshal(bs []byte) error
- func (val *Validator) UnmarshalJSON(bs []byte) error
- type ValidatorSet
- func (set *ValidatorSet) AdjustPower(height int64) error
- func (set *ValidatorSet) Contains(addr crypto.Address) bool
- func (set *ValidatorSet) ForceLeave(addr crypto.Address) error
- func (set *ValidatorSet) Join(val *Validator) error
- func (set *ValidatorSet) Leavers() map[crypto.Address]*Validator
- func (set *ValidatorSet) MaximumPower() int
- func (set *ValidatorSet) TotalPower() int
- func (set *ValidatorSet) UpdateMaximumPower(maximumPower int)
- func (set *ValidatorSet) Validators() map[crypto.Address]*Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func NewValidator ¶
func ValidatorFromBytes ¶
func ValidatorFromJSON ¶
func (*Validator) AddToStake ¶
func (*Validator) BondingHeight ¶
func (*Validator) IncSequence ¶
func (val *Validator) IncSequence()
func (Validator) MarshalJSON ¶
func (Validator) MinimumStakeToUnbond ¶
func (*Validator) SubtractFromStake ¶
func (*Validator) UnmarshalJSON ¶
type ValidatorSet ¶
type ValidatorSet struct {
// contains filtered or unexported fields
}
func NewValidatorSet ¶
func NewValidatorSet(validators map[crypto.Address]*Validator, maximumPower int) *ValidatorSet
func (*ValidatorSet) AdjustPower ¶
func (set *ValidatorSet) AdjustPower(height int64) error
func (*ValidatorSet) ForceLeave ¶
func (set *ValidatorSet) ForceLeave(addr crypto.Address) error
func (*ValidatorSet) Join ¶
func (set *ValidatorSet) Join(val *Validator) error
func (*ValidatorSet) MaximumPower ¶
func (set *ValidatorSet) MaximumPower() int
func (*ValidatorSet) TotalPower ¶
func (set *ValidatorSet) TotalPower() int
TotalPower equals to the number of validator in the set
func (*ValidatorSet) UpdateMaximumPower ¶
func (set *ValidatorSet) UpdateMaximumPower(maximumPower int)
func (*ValidatorSet) Validators ¶
func (set *ValidatorSet) Validators() map[crypto.Address]*Validator
Click to show internal directories.
Click to hide internal directories.