perf: use store has instead of get in HasValidatorSigningInfo (#17359)
This commit is contained in:
parent
85d9791edf
commit
840482f50d
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user