Documentation
¶
Overview ¶
Package validator provides functionality for managing validator information.
Index ¶
- type Validator
- func (val *Validator) AddToStake(amt int64)
- 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) IncSequence()
- func (val *Validator) LastBondingHeight() uint32
- func (val *Validator) LastJoinedHeight() uint32
- func (val *Validator) Number() int32
- func (val Validator) Power() int64
- func (val *Validator) PublicKey() *bls.PublicKey
- func (val *Validator) Sequence() int32
- func (val *Validator) SerializeSize() int
- func (val *Validator) Stake() int64
- func (val *Validator) SubtractFromStake(amt int64)
- func (val *Validator) UnbondingHeight() uint32
- func (val *Validator) UpdateLastBondingHeight(height uint32)
- func (val *Validator) UpdateLastJoinedHeight(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) Bytes ¶
Bytes returns returns the serialized byte representation of the validator.
func (*Validator) IncSequence ¶
func (val *Validator) IncSequence()
IncSequence increases the sequence anytime this validator signs a transaction.
func (*Validator) LastBondingHeight ¶
LastBondingHeight returns the last height in which the validator bonded stake.
func (*Validator) LastJoinedHeight ¶
LastJoinedHeight returns the last height in which the validator joined the committee.
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) UpdateLastJoinedHeight ¶
UpdateLastJoinedHeight updates the last height at which the validator joined the committee.
func (*Validator) UpdateUnbondingHeight ¶
UpdateUnbondingHeight updates the unbonding height for the validator.