Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
likhita-809 committed Jan 30, 2024
1 parent 7050b89 commit ad8f05e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/staking/keeper/slash.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,12 @@ func (k Keeper) Slash(ctx context.Context, consAddr sdk.ConsAddress, infractionH

operatorAddress, err := k.ValidatorAddressCodec().StringToBytes(validator.GetOperator())
if err != nil {
return math.Int{}, err
return math.NewInt(0), err
}

// call the before-modification hook
if err := k.Hooks().BeforeValidatorModified(ctx, operatorAddress); err != nil {
return math.Int{}, fmt.Errorf("failed to call before validator modified hook: %w", err)
return math.NewInt(0), fmt.Errorf("failed to call before validator modified hook: %w", err)
}

// Track remaining slash amount for the validator
Expand Down

0 comments on commit ad8f05e

Please sign in to comment.