aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/vm.go
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/vm.go
parentd3e86f9208d775ee8020d5583d0aac8f3cfb52b2 (diff)
downloadgo-tangerine-0a554a1f27ece4235d180373643482ceb57d90ca.tar
go-tangerine-0a554a1f27ece4235d180373643482ceb57d90ca.tar.gz
go-tangerine-0a554a1f27ece4235d180373643482ceb57d90ca.tar.bz2
go-tangerine-0a554a1f27ece4235d180373643482ceb57d90ca.tar.lz
go-tangerine-0a554a1f27ece4235d180373643482ceb57d90ca.tar.xz
go-tangerine-0a554a1f27ece4235d180373643482ceb57d90ca.tar.zst
go-tangerine-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/vm.go')
-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)
}
}