Skip to content

Commit

Permalink
Review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
alpe committed Oct 7, 2020
1 parent fd9130d commit 5fbf4ae
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions x/wasm/internal/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,11 +566,10 @@ func (k Keeper) dispatchMessages(ctx sdk.Context, contractAddr sdk.AccAddress, m

func gasForContract(ctx sdk.Context) uint64 {
meter := ctx.GasMeter()
// avoid integer overflow
if meter.IsOutOfGas() {
return 0
}
remaining := (meter.Limit() - meter.GasConsumed()) * GasMultiplier
remaining := (meter.Limit() - meter.GasConsumedToLimit()) * GasMultiplier
if remaining > MaxGas {
return MaxGas
}
Expand Down

0 comments on commit 5fbf4ae

Please sign in to comment.