Skip to content

Commit

Permalink
remove double get in staking
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle committed Oct 26, 2024
1 parent 51d8acf commit 6111a2e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions x/slashing/keeper/infractions.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,7 @@ func (k Keeper) HandleValidatorSignatureWithParams(ctx context.Context, params t
// if we are past the minimum height and the validator has missed too many blocks, punish them
if height > minHeight && signInfo.MissedBlocksCounter > maxMissed {
modifiedSignInfo = true
validator, err := k.sk.ValidatorByConsAddr(ctx, consAddr)
if err != nil {
return err
}
if validator != nil && !validator.IsJailed() {
if val != nil && !val.IsJailed() {
// Downtime confirmed: slash and jail the validator
// We need to retrieve the stake distribution that signed the block. To do this, we subtract ValidatorUpdateDelay from the evidence height,
// and subtract an additional 1 since this is the LastCommit.
Expand Down

0 comments on commit 6111a2e

Please sign in to comment.