diff options
author | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-04-02 11:17:15 +0800 |
---|---|---|
committer | Gustav Simonsson <gustav.simonsson@gmail.com> | 2015-04-02 12:22:32 +0800 |
commit | c26c8d3a44cdd45994b6d99777d620565bab8f9c (patch) | |
tree | 6ab5a74981e9fb9f869f1ef884a375163b898113 /core/vm/vm_jit.go | |
parent | 516ec28544e0f9c76e18d82742d3ae58cfb59cc1 (diff) | |
download | go-tangerine-c26c8d3a44cdd45994b6d99777d620565bab8f9c.tar.gz go-tangerine-c26c8d3a44cdd45994b6d99777d620565bab8f9c.tar.zst go-tangerine-c26c8d3a44cdd45994b6d99777d620565bab8f9c.zip |
Read most protocol params from common/params.json
* Add params package with exported variables generated from
github.com/ethereum/common/blob/master/params.json
* Use params package variables in applicable places
* Add check for minimum gas limit in validation of block's gas limit
* Remove common/params.json from go-ethereum to avoid
outdated version of it
Diffstat (limited to 'core/vm/vm_jit.go')
-rw-r--r-- | core/vm/vm_jit.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/vm/vm_jit.go b/core/vm/vm_jit.go index 2b88d8620..991ade318 100644 --- a/core/vm/vm_jit.go +++ b/core/vm/vm_jit.go @@ -18,8 +18,8 @@ import ( "bytes" "errors" "fmt" - "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/crypto" "math/big" "unsafe" ) @@ -330,7 +330,7 @@ func env_create(_vm unsafe.Pointer, _gas *int64, _value unsafe.Pointer, initData ret, suberr, ref := vm.env.Create(vm.me, nil, initData, gas, vm.price, value) if suberr == nil { dataGas := big.NewInt(int64(len(ret))) // TODO: Nto the best design. env.Create can do it, it has the reference to gas counter - dataGas.Mul(dataGas, GasCreateByte) + dataGas.Mul(dataGas, params.CreateDataGas) gas.Sub(gas, dataGas) *result = hash2llvm(ref.Address()) } |