Slash() and ForceUnbond() are functions of ValidatorSet, not Validator
This commit is contained in:
+7
-8
@@ -17,14 +17,11 @@ const (
|
||||
|
||||
// validator for a delegated proof of stake system
|
||||
type Validator interface {
|
||||
GetStatus() BondStatus // status of the validator
|
||||
GetOwner() Address // owner address to receive/return validators coins
|
||||
GetPubKey() crypto.PubKey // validation pubkey
|
||||
GetPower() Rat // validation power
|
||||
GetBondHeight() int64 // height in which the validator became active
|
||||
Slash(Context, int64, Rat) // slash the validator and delegators of the validator
|
||||
// for an offense at a specified height by a specified fraction
|
||||
ForceUnbond(Context, int64) // force unbond the validator, including a duration which must pass before they can rebond
|
||||
GetStatus() BondStatus // status of the validator
|
||||
GetOwner() Address // owner address to receive/return validators coins
|
||||
GetPubKey() crypto.PubKey // validation pubkey
|
||||
GetPower() Rat // validation power
|
||||
GetBondHeight() int64 // height in which the validator became active
|
||||
}
|
||||
|
||||
// validator which fulfills abci validator interface for use in Tendermint
|
||||
@@ -48,6 +45,8 @@ type ValidatorSet interface {
|
||||
Validator(Context, Address) Validator // get a particular validator by owner address
|
||||
ValidatorByPubKey(Context, crypto.PubKey) Validator // get a particular validator by public key
|
||||
TotalPower(Context) Rat // total power of the validator set
|
||||
Slash(Context, crypto.PubKey, int64, Rat) // slash the validator and delegators of the validator, specifying offence height & slash fraction
|
||||
ForceUnbond(Context, crypto.PubKey, int64) // force unbond the validator, including a duration which must pass before they can rebond
|
||||
}
|
||||
|
||||
//_______________________________________________________________________________
|
||||
|
||||
Reference in New Issue
Block a user