Documentation ¶
Index ¶
- Constants
- type Validator
- func (v *Validator) AddAccumReward(amount *big.Int)
- func (v *Validator) CountAbsentTimes() int
- func (v *Validator) GetAccumReward() *big.Int
- func (v *Validator) GetAddress() types.TmAddress
- func (v *Validator) GetTotalBipStake() *big.Int
- func (v *Validator) IsToDrop() bool
- func (v *Validator) SetAbsent(height uint64)
- func (v *Validator) SetAccumReward(value *big.Int)
- func (v *Validator) SetPresent(height uint64)
- func (v *Validator) SetTotalBipStake(value *big.Int)
- type Validators
- func (v *Validators) Commit() error
- func (v *Validators) Create(pubkey types.Pubkey, stake *big.Int)
- func (v *Validators) Export(state *types.AppState)
- func (v *Validators) GetByPublicKey(pubKey types.Pubkey) *Validator
- func (v *Validators) GetByTmAddress(address types.TmAddress) *Validator
- func (v *Validators) GetValidators() []*Validator
- func (v *Validators) LoadValidators()
- func (v *Validators) PayRewards(height uint64)
- func (v *Validators) PunishByzantineValidator(tmAddress [20]byte)
- func (v *Validators) SetNewValidators(candidates []candidates.Candidate)
- func (v *Validators) SetToDrop(pubkey types.Pubkey)
- func (v *Validators) SetValidatorAbsent(height uint64, address types.TmAddress)
- func (v *Validators) SetValidatorPresent(height uint64, address types.TmAddress)
- func (v *Validators) SetValidators(vals []*Validator)
Constants ¶
View Source
const ( ValidatorMaxAbsentWindow = 24 ValidatorMaxAbsentTimes = 12 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Validator ¶
type Validator struct { PubKey types.Pubkey AbsentTimes *types.BitArray // contains filtered or unexported fields }
func NewValidator ¶
func (*Validator) AddAccumReward ¶
func (*Validator) CountAbsentTimes ¶
func (*Validator) GetAccumReward ¶
func (*Validator) GetAddress ¶
func (*Validator) GetTotalBipStake ¶
func (*Validator) SetAccumReward ¶
func (*Validator) SetPresent ¶
func (*Validator) SetTotalBipStake ¶
type Validators ¶
type Validators struct {
// contains filtered or unexported fields
}
func NewValidators ¶
func (*Validators) Commit ¶
func (v *Validators) Commit() error
func (*Validators) Export ¶
func (v *Validators) Export(state *types.AppState)
func (*Validators) GetByPublicKey ¶ added in v1.1.6
func (v *Validators) GetByPublicKey(pubKey types.Pubkey) *Validator
func (*Validators) GetByTmAddress ¶ added in v1.1.6
func (v *Validators) GetByTmAddress(address types.TmAddress) *Validator
func (*Validators) GetValidators ¶
func (v *Validators) GetValidators() []*Validator
func (*Validators) LoadValidators ¶
func (v *Validators) LoadValidators()
func (*Validators) PayRewards ¶
func (v *Validators) PayRewards(height uint64)
func (*Validators) PunishByzantineValidator ¶
func (v *Validators) PunishByzantineValidator(tmAddress [20]byte)
func (*Validators) SetNewValidators ¶
func (v *Validators) SetNewValidators(candidates []candidates.Candidate)
func (*Validators) SetToDrop ¶
func (v *Validators) SetToDrop(pubkey types.Pubkey)
func (*Validators) SetValidatorAbsent ¶
func (v *Validators) SetValidatorAbsent(height uint64, address types.TmAddress)
func (*Validators) SetValidatorPresent ¶
func (v *Validators) SetValidatorPresent(height uint64, address types.TmAddress)
func (*Validators) SetValidators ¶
func (v *Validators) SetValidators(vals []*Validator)
Click to show internal directories.
Click to hide internal directories.