Merge PR #3546: Min Self Delegation
This commit is contained in:
committed by
Jack Zampolin
parent
ba63eb1801
commit
cff985ffc5
@@ -31,6 +31,10 @@ func handleMsgUnjail(ctx sdk.Context, msg MsgUnjail, k Keeper) sdk.Result {
|
||||
return ErrMissingSelfDelegation(k.codespace).Result()
|
||||
}
|
||||
|
||||
if validator.GetDelegatorShareExRate().Mul(selfDel.GetShares()).TruncateInt().LT(validator.GetMinSelfDelegation()) {
|
||||
return ErrSelfDelegationTooLowToUnjail(k.codespace).Result()
|
||||
}
|
||||
|
||||
// cannot be unjailed if not jailed
|
||||
if !validator.GetJailed() {
|
||||
return ErrValidatorNotJailed(k.codespace).Result()
|
||||
|
||||
Reference in New Issue
Block a user