Skip to content

Commit

Permalink
Update x/ccv/provider/keeper/punish_validator.go
Browse files Browse the repository at this point in the history
Co-authored-by: insumity <[email protected]>
  • Loading branch information
sainoe and insumity authored Oct 12, 2023
1 parent fb92af9 commit 28e0c14
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions x/ccv/provider/keeper/punish_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ func (k Keeper) SlashValidator(ctx sdk.Context, providerAddr types.ProviderConsA
return fmt.Errorf("validator is unbonded. provider consensus address: %s", providerAddr.String())
}

// check if the validator is already tombstoned to avoid slashing a validator more than once

Check failure on line 93 in x/ccv/provider/keeper/punish_validator.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gci`-ed with --skip-generated -s standard -s default -s blank -s dot -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) -s prefix(github.com/cometbft/cometbft) -s prefix(github.com/cosmos/interchain-security) --custom-order (gci)
if k.slashingKeeper.IsTombstoned(ctx, providerAddr.ToSdkConsAddr()) {
return fmt.Errorf("validator is tombstoned. provider consensus address: %s", providerAddr.String())
}
Expand Down

0 comments on commit 28e0c14

Please sign in to comment.