Skip to content

Commit

Permalink
perf: use store has instead of get in HasValidatorSigningInfo (#17359)
Browse files Browse the repository at this point in the history
  • Loading branch information
fx0x55 committed Aug 11, 2023
1 parent 85d9791 commit 840482f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/slashing/keeper/signing_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
// HasValidatorSigningInfo returns if a given validator has signing information
// persisted.
func (k Keeper) HasValidatorSigningInfo(ctx context.Context, consAddr sdk.ConsAddress) bool {
_, err := k.ValidatorSigningInfo.Get(ctx, consAddr)
return err == nil
has, err := k.ValidatorSigningInfo.Has(ctx, consAddr)
return err == nil && has
}

// JailUntil attempts to set a validator's JailedUntil attribute in its signing
Expand Down

0 comments on commit 840482f

Please sign in to comment.