diff --git a/x/alliance/keeper/validator.go b/x/alliance/keeper/validator.go index 5d59463..1d945da 100644 --- a/x/alliance/keeper/validator.go +++ b/x/alliance/keeper/validator.go @@ -55,7 +55,7 @@ func (k Keeper) createAllianceValidatorInfo(ctx context.Context, valAddr sdk.Val func (k Keeper) IterateAllianceValidatorInfo(ctx context.Context, cb func(valAddr sdk.ValAddress, info types.AllianceValidatorInfo) (stop bool)) (err error) { store := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) iter := storetypes.KVStorePrefixIterator(store, types.ValidatorInfoKey) - iter.Close() //nolint:errcheck,nolintlint + defer iter.Close() //nolint:errcheck,nolintlint for ; iter.Valid(); iter.Next() { var info types.AllianceValidatorInfo b := iter.Value()