Documentation ¶
Index ¶
- type Validator
- func (val *Validator) AddToStake(amt int64)
- func (val *Validator) Address() crypto.Address
- func (val *Validator) Bytes() ([]byte, error)
- 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
}
func GenerateTestValidator ¶
GenerateTestValidator generates a validator for testing purpose.
func NewValidator ¶
NewValidator constructs a new validator object.
func (*Validator) AddToStake ¶
AddToStake increases the stake by bonding transaction.
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 validator bonded stake
func (*Validator) LastJoinedHeight ¶
LastJoinedHeight returns the last height in which validator joined into the committee
func (*Validator) SerializeSize ¶
func (*Validator) SubtractFromStake ¶
func (*Validator) UnbondingHeight ¶
UnbondingHeight returns the last height in which validator unbonded stake
func (*Validator) UpdateLastBondingHeight ¶
UpdateLastBondingHeight updates the last height that this validator bonded some stakes.
func (*Validator) UpdateLastJoinedHeight ¶
UpdateLastJoinedHeight updates the last height that this validator joined the committee.
func (*Validator) UpdateUnbondingHeight ¶
UpdateUnbondingHeight updates the unbonding height for the validator.