diff options
author | Felix Lange <fjl@twurst.com> | 2016-11-14 17:52:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-14 17:52:02 +0800 |
commit | ca73dea3b9bcdf3b5424b5c48c70817439e2e304 (patch) | |
tree | 670e2833878e72555644fbbd81db6c5a1b44493f /core/vm/instructions.go | |
parent | 21701190ac0a838e347f31b7a918bb0a60c1e8c1 (diff) | |
parent | 648bd22427000b6e20a5e1a9c397005aa1ad4f9b (diff) | |
download | go-tangerine-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar go-tangerine-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar.gz go-tangerine-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar.bz2 go-tangerine-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar.lz go-tangerine-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar.xz go-tangerine-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.tar.zst go-tangerine-ca73dea3b9bcdf3b5424b5c48c70817439e2e304.zip |
Merge pull request #3179 from obscuren/eip-158
EIP158 & 160 Hardfork
Diffstat (limited to 'core/vm/instructions.go')
-rw-r--r-- | core/vm/instructions.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 94a8c6348..4f98953b5 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -515,7 +515,7 @@ func opCreate(instr instruction, pc *uint64, env Environment, contract *Contract input = memory.Get(offset.Int64(), size.Int64()) gas = new(big.Int).Set(contract.Gas) ) - if env.RuleSet().GasTable(env.BlockNumber()).CreateBySuicide != nil { + if env.ChainConfig().IsEIP150(env.BlockNumber()) { gas.Div(gas, n64) gas = gas.Sub(contract.Gas, gas) } @@ -526,7 +526,7 @@ func opCreate(instr instruction, pc *uint64, env Environment, contract *Contract // homestead we must check for CodeStoreOutOfGasError (homestead only // rule) and treat as an error, if the ruleset is frontier we must // ignore this error and pretend the operation was successful. - if env.RuleSet().IsHomestead(env.BlockNumber()) && suberr == CodeStoreOutOfGasError { + if env.ChainConfig().IsHomestead(env.BlockNumber()) && suberr == CodeStoreOutOfGasError { stack.push(new(big.Int)) } else if suberr != nil && suberr != CodeStoreOutOfGasError { stack.push(new(big.Int)) |