Skip to content

Commit

Permalink
MAT-1449 - review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mankenavenkatesh committed May 18, 2020
1 parent 3793609 commit c483dca
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions slashing/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package slashing
import (
"bytes"
"encoding/hex"
"fmt"
"math/big"

sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -51,9 +50,9 @@ func handlerMsgTick(ctx sdk.Context, msg types.MsgTick, k Keeper, contractCaller

// check if slash limit is exceeded or not
totalSlashedAmount := k.GetTotalSlashedAmount(ctx)
if totalSlashedAmount <= 0 {
k.Logger(ctx).Error("TotalSlashedAmount is less than or equal to zero")
return hmCommon.ErrInvalidMsg(k.Codespace(), fmt.Sprintf("TotalSlashedAmount is less than or equal to zero", totalSlashedAmount)).Result()
if totalSlashedAmount == 0 {
k.Logger(ctx).Error("Slashed amount is zero")
return hmCommon.ErrInvalidMsg(k.Codespace(), "Slashed amount is zero", totalSlashedAmount).Result()
}

// check if tick msgs are in continuity
Expand Down

0 comments on commit c483dca

Please sign in to comment.