From 0a554a1f27ece4235d180373643482ceb57d90ca Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 1 Apr 2015 10:53:32 +0200 Subject: Blocktest fixed, Execution fixed * Added new CreateAccount method which properly overwrites previous accounts (excluding balance) * Fixed block tests (100% success) --- core/vm/vm.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/vm') 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) } } -- cgit