aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-01 16:53:32 +0800
committerobscuren <geffobscura@gmail.com>2015-04-01 16:53:32 +0800
commit0a554a1f27ece4235d180373643482ceb57d90ca (patch)
tree6ab7d4cd70f7c49f64822d8e626f422158c70e78 /core/vm
parentd3e86f9208d775ee8020d5583d0aac8f3cfb52b2 (diff)
downloaddexon-0a554a1f27ece4235d180373643482ceb57d90ca.tar
dexon-0a554a1f27ece4235d180373643482ceb57d90ca.tar.gz
dexon-0a554a1f27ece4235d180373643482ceb57d90ca.tar.bz2
dexon-0a554a1f27ece4235d180373643482ceb57d90ca.tar.lz
dexon-0a554a1f27ece4235d180373643482ceb57d90ca.tar.xz
dexon-0a554a1f27ece4235d180373643482ceb57d90ca.tar.zst
dexon-0a554a1f27ece4235d180373643482ceb57d90ca.zip
Blocktest fixed, Execution fixed
* Added new CreateAccount method which properly overwrites previous accounts (excluding balance) * Fixed block tests (100% success)
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)
}
}