diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-01 16:53:32 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-01 16:53:32 +0800 |
commit | 0a554a1f27ece4235d180373643482ceb57d90ca (patch) | |
tree | 6ab7d4cd70f7c49f64822d8e626f422158c70e78 /core/vm | |
parent | d3e86f9208d775ee8020d5583d0aac8f3cfb52b2 (diff) | |
download | dexon-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.go | 3 |
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) } } |