Skip to content

Commit 631a8a1

Browse files
Use GasMeter instead of BlockGasMeter
1 parent 6364f94 commit 631a8a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

x/leverage/keeper/token.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ func (k Keeper) SetTokenSettings(ctx sdk.Context, token types.Token) error {
5959
k.hooks.AfterTokenRegistered(ctx, token)
6060
store.Set(tokenKey, bz)
6161
k.tokenRegCache.Add(token.BaseDenom, token)
62-
ctx.BlockGasMeter().ConsumeGas(gasCacheUpdate, "cache update")
62+
ctx.GasMeter().ConsumeGas(gasCacheUpdate, "cache update")
6363
return nil
6464
}
6565

6666
// GetTokenSettings gets a token from the x/leverage module's KVStore.
6767
func (k Keeper) GetTokenSettings(ctx sdk.Context, denom string) (types.Token, error) {
68-
ctx.BlockGasMeter().ConsumeGas(gasCacheAccess, "cache access")
68+
ctx.GasMeter().ConsumeGas(gasCacheAccess, "cache access")
6969
if v, ok := k.tokenRegCache.Get(denom); ok {
7070
return v.(types.Token), nil
7171
}

0 commit comments

Comments
 (0)