Merge PR #1805: Downtime slashing off-by-one-block fix

* Avoid slashing & revoking no longer stored or already revoked validators for downtime
* Add testcase
* Update PENDING.md
This commit is contained in:
Christopher Goes
2018-07-25 04:12:48 +02:00
committed by GitHub
parent 89eba4952c
commit 4b7f6efd87
6 changed files with 77 additions and 7 deletions
+3 -2
View File
@@ -66,8 +66,9 @@ type ValidatorSet interface {
IterateValidatorsBonded(Context,
func(index int64, validator Validator) (stop bool))
Validator(Context, AccAddress) Validator // get a particular validator by owner AccAddress
TotalPower(Context) Rat // total power of the validator set
Validator(Context, AccAddress) Validator // get a particular validator by owner AccAddress
ValidatorByPubKey(Context, crypto.PubKey) Validator // get a particular validator by signing PubKey
TotalPower(Context) Rat // total power of the validator set
// slash the validator and delegators of the validator, specifying offence height, offence power, and slash fraction
Slash(Context, crypto.PubKey, int64, int64, Rat)