Documentation ¶
Index ¶
- type Validator
- func (v Validator) GetBondHeight() int64
- func (v Validator) GetDelegatorShares() sdk.Rat
- func (v Validator) GetMoniker() string
- func (v Validator) GetOwner() sdk.AccAddress
- func (v Validator) GetPower() sdk.Rat
- func (v Validator) GetPubKey() crypto.PubKey
- func (v Validator) GetRevoked() bool
- func (v Validator) GetStatus() sdk.BondStatus
- type ValidatorSet
- func (vs *ValidatorSet) AddValidator(val Validator)
- func (vs *ValidatorSet) IterateValidators(ctx sdk.Context, fn func(index int64, Validator sdk.Validator) bool)
- func (vs *ValidatorSet) IterateValidatorsBonded(ctx sdk.Context, fn func(index int64, Validator sdk.Validator) bool)
- func (vs *ValidatorSet) RemoveValidator(addr sdk.AccAddress)
- func (vs *ValidatorSet) Revoke(ctx sdk.Context, pubkey crypto.PubKey)
- func (vs *ValidatorSet) Slash(ctx sdk.Context, pubkey crypto.PubKey, height int64, power int64, amt sdk.Rat)
- func (vs *ValidatorSet) TotalPower(ctx sdk.Context) sdk.Rat
- func (vs *ValidatorSet) Unrevoke(ctx sdk.Context, pubkey crypto.PubKey)
- func (vs *ValidatorSet) Validator(ctx sdk.Context, addr sdk.AccAddress) sdk.Validator
- func (vs *ValidatorSet) ValidatorByPubKey(ctx sdk.Context, pubkey 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.AccAddress Power sdk.Rat }
Validator implements sdk.Validator
func (Validator) GetDelegatorShares ¶
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) IterateValidators ¶
func (vs *ValidatorSet) IterateValidators(ctx sdk.Context, fn func(index int64, Validator sdk.Validator) bool)
IterateValidators implements sdk.ValidatorSet
func (*ValidatorSet) IterateValidatorsBonded ¶
func (vs *ValidatorSet) IterateValidatorsBonded(ctx sdk.Context, fn func(index int64, Validator sdk.Validator) bool)
IterateValidatorsBonded implements sdk.ValidatorSet
func (*ValidatorSet) RemoveValidator ¶
func (vs *ValidatorSet) RemoveValidator(addr sdk.AccAddress)
Helper function for removing exsting validator
func (*ValidatorSet) Revoke ¶
func (vs *ValidatorSet) Revoke(ctx sdk.Context, pubkey crypto.PubKey)
Implements sdk.ValidatorSet
func (*ValidatorSet) Slash ¶
func (vs *ValidatorSet) Slash(ctx sdk.Context, pubkey crypto.PubKey, height int64, power int64, amt sdk.Rat)
Implements sdk.ValidatorSet
func (*ValidatorSet) TotalPower ¶
func (vs *ValidatorSet) TotalPower(ctx sdk.Context) sdk.Rat
TotalPower implements sdk.ValidatorSet
func (*ValidatorSet) Unrevoke ¶
func (vs *ValidatorSet) Unrevoke(ctx sdk.Context, pubkey crypto.PubKey)
Implements sdk.ValidatorSet
func (*ValidatorSet) Validator ¶
func (vs *ValidatorSet) Validator(ctx sdk.Context, addr sdk.AccAddress) sdk.Validator
Validator implements sdk.ValidatorSet
func (*ValidatorSet) ValidatorByPubKey ¶ added in v0.23.0
ValidatorByPubKey implements sdk.ValidatorSet
Click to show internal directories.
Click to hide internal directories.