aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm
diff options
context:
space:
mode:
Diffstat (limited to 'core/vm')
-rw-r--r--core/vm/vm.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/vm/vm.go b/core/vm/vm.go
index 6c3dd240a..59c64e8a3 100644
--- a/core/vm/vm.go
+++ b/core/vm/vm.go
@@ -857,7 +857,8 @@ func (self *Vm) calculateGasAndSize(context *Context, caller ContextRef, op OpCo
quadCoef = new(big.Int).Div(pow, GasQuadCoeffDenom)
newTotalFee := new(big.Int).Add(linCoef, quadCoef)
- gas.Add(gas, new(big.Int).Sub(newTotalFee, oldTotalFee))
+ fee := new(big.Int).Sub(newTotalFee, oldTotalFee)
+ gas.Add(gas, fee)
}
}