diff --git a/x/capability/keeper/keeper.go b/x/capability/keeper/keeper.go index 1fa6d0305118..f56c77e9680c 100644 --- a/x/capability/keeper/keeper.go +++ b/x/capability/keeper/keeper.go @@ -118,8 +118,9 @@ func (k *Keeper) InitMemStore(ctx sdk.Context) { panic(fmt.Sprintf("invalid memory store type; got %s, expected: %s", memStoreType, storetypes.StoreTypeMemory)) } - // create context with no block gas meter to ensure we do not consume gas during local initialization logic. - noGasCtx := ctx.WithBlockGasMeter(sdk.NewInfiniteGasMeter()) + // Create a context with no `BlockGasMeter`, and no `GasMeter`. This ensures we do not consume gas during local + // initialization logic. + noGasCtx := ctx.WithBlockGasMeter(sdk.NewInfiniteGasMeter()).WithGasMeter(sdk.NewInfiniteGasMeter()) // check if memory store has not been initialized yet by checking if initialized flag is nil. if !k.IsInitialized(noGasCtx) {