Documentation ¶
Index ¶
- type Validator
- func (v Validator) GetBondHeight() int64
- func (v Validator) GetCommission() sdk.Dec
- func (v Validator) GetConsAddr() sdk.ConsAddress
- func (v Validator) GetConsPubKey() crypto.PubKey
- func (v Validator) GetDelegatorShares() sdk.Dec
- func (v Validator) GetJailed() bool
- func (v Validator) GetMoniker() string
- func (v Validator) GetOperator() sdk.ValAddress
- func (v Validator) GetPower() sdk.Dec
- func (v Validator) GetStatus() sdk.BondStatus
- func (v Validator) GetTokens() sdk.Dec
- type ValidatorSet
- func (vs *ValidatorSet) AddValidator(val Validator)
- func (vs *ValidatorSet) Delegation(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) sdk.Delegation
- func (vs *ValidatorSet) IterateBondedValidatorsByPower(ctx sdk.Context, fn func(index int64, Validator sdk.Validator) bool)
- func (vs *ValidatorSet) IterateLastValidators(ctx sdk.Context, fn func(index int64, Validator sdk.Validator) bool)
- func (vs *ValidatorSet) IterateValidators(ctx sdk.Context, fn func(index int64, Validator sdk.Validator) bool)
- func (vs *ValidatorSet) Jail(_ sdk.Context, _ sdk.ConsAddress)
- func (vs *ValidatorSet) RemoveValidator(addr sdk.AccAddress)
- func (vs *ValidatorSet) Slash(_ sdk.Context, _ sdk.ConsAddress, _ int64, _ int64, _ sdk.Dec)
- func (vs *ValidatorSet) TotalPower(ctx sdk.Context) sdk.Dec
- func (vs *ValidatorSet) Unjail(_ sdk.Context, _ sdk.ConsAddress)
- func (vs *ValidatorSet) Validator(ctx sdk.Context, addr sdk.ValAddress) sdk.Validator
- func (vs *ValidatorSet) ValidatorByConsAddr(_ sdk.Context, _ sdk.ConsAddress) sdk.Validator
- func (vs *ValidatorSet) ValidatorByConsPubKey(_ sdk.Context, _ crypto.PubKey) sdk.Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Validator ¶
type Validator struct { Address sdk.ValAddress Power sdk.Dec }
Validator implements sdk.Validator
func (Validator) GetCommission ¶ added in v0.25.0
Implements sdk.Validator
func (Validator) GetConsAddr ¶ added in v0.25.0
func (v Validator) GetConsAddr() sdk.ConsAddress
Implements sdk.Validator
func (Validator) GetConsPubKey ¶ added in v0.25.0
Implements sdk.Validator
func (Validator) GetDelegatorShares ¶
Implements sdk.Validator
func (Validator) GetOperator ¶ added in v0.25.0
func (v Validator) GetOperator() sdk.ValAddress
Implements sdk.Validator
type ValidatorSet ¶
type ValidatorSet struct {
Validators []Validator
}
Implements sdk.Validator
func (*ValidatorSet) AddValidator ¶
func (vs *ValidatorSet) AddValidator(val Validator)
Helper function for adding new validator
func (*ValidatorSet) Delegation ¶ added in v0.25.0
func (vs *ValidatorSet) Delegation(_ sdk.Context, _ sdk.AccAddress, _ sdk.ValAddress) sdk.Delegation
Implements sdk.ValidatorSet
func (*ValidatorSet) IterateBondedValidatorsByPower ¶ added in v0.26.0
func (vs *ValidatorSet) IterateBondedValidatorsByPower(ctx sdk.Context, fn func(index int64, Validator sdk.Validator) bool)
IterateBondedValidatorsByPower implements sdk.ValidatorSet
func (*ValidatorSet) IterateLastValidators ¶ added in v0.26.0
func (vs *ValidatorSet) IterateLastValidators(ctx sdk.Context, fn func(index int64, Validator sdk.Validator) bool)
IterateLastValidators implements sdk.ValidatorSet
func (*ValidatorSet) IterateValidators ¶
func (vs *ValidatorSet) IterateValidators(ctx sdk.Context, fn func(index int64, Validator sdk.Validator) bool)
IterateValidators implements sdk.ValidatorSet
func (*ValidatorSet) Jail ¶ added in v0.25.0
func (vs *ValidatorSet) Jail(_ sdk.Context, _ sdk.ConsAddress)
Implements sdk.ValidatorSet
func (*ValidatorSet) RemoveValidator ¶
func (vs *ValidatorSet) RemoveValidator(addr sdk.AccAddress)
Helper function for removing exsting validator
func (*ValidatorSet) Slash ¶
func (vs *ValidatorSet) Slash(_ sdk.Context, _ sdk.ConsAddress, _ int64, _ int64, _ sdk.Dec)
Implements sdk.ValidatorSet
func (*ValidatorSet) TotalPower ¶
func (vs *ValidatorSet) TotalPower(ctx sdk.Context) sdk.Dec
TotalPower implements sdk.ValidatorSet
func (*ValidatorSet) Unjail ¶ added in v0.25.0
func (vs *ValidatorSet) Unjail(_ sdk.Context, _ sdk.ConsAddress)
Implements sdk.ValidatorSet
func (*ValidatorSet) Validator ¶
func (vs *ValidatorSet) Validator(ctx sdk.Context, addr sdk.ValAddress) sdk.Validator
Validator implements sdk.ValidatorSet
func (*ValidatorSet) ValidatorByConsAddr ¶ added in v0.25.0
func (vs *ValidatorSet) ValidatorByConsAddr(_ sdk.Context, _ sdk.ConsAddress) sdk.Validator
ValidatorByPubKey implements sdk.ValidatorSet
func (*ValidatorSet) ValidatorByConsPubKey ¶ added in v0.25.0
ValidatorByPubKey implements sdk.ValidatorSet