Missed a min in slashing

This commit is contained in:
ValarDragon 2018-07-09 14:11:51 -07:00
parent 0c5358c267
commit 1433b61a92
1 changed files with 1 additions and 4 deletions

View File

@ -202,10 +202,7 @@ func (k Keeper) slashRedelegation(ctx sdk.Context, validator types.Validator, re
// Possible since the redelegation may already
// have been slashed, and slash amounts are calculated
// according to stake held at time of infraction
redelegationSlashAmount := slashAmount
if redelegationSlashAmount.GT(redelegation.Balance.Amount) {
redelegationSlashAmount = redelegation.Balance.Amount
}
redelegationSlashAmount := sdk.MinInt(slashAmount, redelegation.Balance.Amount)
// Update redelegation if necessary
if !redelegationSlashAmount.IsZero() {