aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2017-09-04 17:53:25 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-09-04 17:53:25 +0800
commite7408b5552002df7c3ba6a2351f14c533dfc5a36 (patch)
tree43d2d1706b61e5c29bdbac9cb3e5bd786b0ee61a /core/vm
parent1901521ed0423a5feaadd3635b10783c5a998151 (diff)
downloadgo-tangerine-e7408b5552002df7c3ba6a2351f14c533dfc5a36.tar
go-tangerine-e7408b5552002df7c3ba6a2351f14c533dfc5a36.tar.gz
go-tangerine-e7408b5552002df7c3ba6a2351f14c533dfc5a36.tar.bz2
go-tangerine-e7408b5552002df7c3ba6a2351f14c533dfc5a36.tar.lz
go-tangerine-e7408b5552002df7c3ba6a2351f14c533dfc5a36.tar.xz
go-tangerine-e7408b5552002df7c3ba6a2351f14c533dfc5a36.tar.zst
go-tangerine-e7408b5552002df7c3ba6a2351f14c533dfc5a36.zip
core/vm: Make MaxCodesize non-retroactive (#15072)
* core/vm: Make max_codesize only applicable post Spurious Dragon/158/155/161/170 * tests: Remove expected failure
Diffstat (limited to 'core/vm')
-rw-r--r--core/vm/evm.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/vm/evm.go b/core/vm/evm.go
index caf8b4507..495d9beea 100644
--- a/core/vm/evm.go
+++ b/core/vm/evm.go
@@ -336,7 +336,7 @@ func (evm *EVM) Create(caller ContractRef, code []byte, gas uint64, value *big.I
ret, err = run(evm, snapshot, contract, nil)
// check whether the max code size has been exceeded
- maxCodeSizeExceeded := len(ret) > params.MaxCodeSize
+ maxCodeSizeExceeded := evm.ChainConfig().IsEIP158(evm.BlockNumber) && len(ret) > params.MaxCodeSize
// if the contract creation ran successfully and no errors were returned
// calculate the gas required to store the code. If the code could not
// be stored due to not enough gas set an error and let it be handled