Documentation ¶
Overview ¶
Package validator provides functionality for managing validator information.
Index ¶
- type Validator
- func (val *Validator) AddToStake(amt amount.Amount)
- func (val *Validator) Address() crypto.Address
- func (val *Validator) Bytes() ([]byte, error)
- func (val *Validator) Clone() *Validator
- func (val *Validator) Hash() hash.Hash
- func (val *Validator) LastBondingHeight() uint32
- func (val *Validator) LastSortitionHeight() uint32
- func (val *Validator) Number() int32
- func (val Validator) Power() int64
- func (val *Validator) PublicKey() *bls.PublicKey
- func (val *Validator) SerializeSize() int
- func (val *Validator) Stake() amount.Amount
- func (val *Validator) SubtractFromStake(amt amount.Amount)
- func (val *Validator) UnbondingHeight() uint32
- func (val *Validator) UpdateLastBondingHeight(height uint32)
- func (val *Validator) UpdateLastSortitionHeight(height uint32)
- func (val *Validator) UpdateUnbondingHeight(height uint32)
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
}
The Validator struct represents a validator object.
func NewValidator ¶
NewValidator constructs a new validator from the given public key and number.
func (*Validator) AddToStake ¶
AddToStake adds the given amount to the validator's stake.
func (*Validator) LastBondingHeight ¶
LastBondingHeight returns the last height in which the validator bonded stake.
func (*Validator) LastSortitionHeight ¶ added in v0.15.0
LastSortitionHeight returns the last height in which the validator evaluated sortition.
func (*Validator) SerializeSize ¶
SerializeSize returns the size in bytes required to serialize the validator.
func (*Validator) SubtractFromStake ¶
SubtractFromStake subtracts the given amount from the validator's stake.
func (*Validator) UnbondingHeight ¶
UnbondingHeight returns the last height in which the validator unbonded stake.
func (*Validator) UpdateLastBondingHeight ¶
UpdateLastBondingHeight updates the last height at which the validator bonded some stakes.
func (*Validator) UpdateLastSortitionHeight ¶ added in v0.15.0
UpdateLastJoinedHeight updates the last height at which the validator joined the committee.
func (*Validator) UpdateUnbondingHeight ¶
UpdateUnbondingHeight updates the unbonding height for the validator.