Merge PR #2176: Ensure Legacy Validator Delegation Invariants

* Test and allow jailed validator to self-bond

* Implement TestJailedValidatorDelegations

* Restructure TestJailedValidatorDelegations

* Add Delegation to Validator type and update handleMsgUnjail accordingly

* Update ErrMissingSelfDelegation error message

* Update democoin mock validator set impl

* Update pending log

* Add comment to ValidatorSet
This commit is contained in:
Alexander Bezobchuk
2018-08-31 00:10:51 -04:00
committed by Rigel
parent 2d92803b9f
commit df33452490
10 changed files with 199 additions and 13 deletions
+4
View File
@@ -75,6 +75,10 @@ type ValidatorSet interface {
Slash(Context, crypto.PubKey, int64, int64, Dec)
Jail(Context, crypto.PubKey) // jail a validator
Unjail(Context, crypto.PubKey) // unjail a validator
// Delegation allows for getting a particular delegation for a given validator
// and delegator outside the scope of the staking module.
Delegation(Context, AccAddress, AccAddress) Delegation
}
//_______________________________________________________________________________