aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2017-09-14 15:35:54 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-09-14 15:35:54 +0800
commit9be07de5396527eb527f3ca0dd402213c0008a3e (patch)
tree9bf0efb8b97884f3cbf058aac8333b8e0c0e1536 /core
parent885c13c2c941710f5545bee01541e6f7602599aa (diff)
downloadgo-tangerine-9be07de5396527eb527f3ca0dd402213c0008a3e.tar.gz
go-tangerine-9be07de5396527eb527f3ca0dd402213c0008a3e.tar.zst
go-tangerine-9be07de5396527eb527f3ca0dd402213c0008a3e.zip
params: Updated finalized gascosts for ECMUL/MODEXP (#15135)
* params: Updated finalized gascosts for ECMUL/MODEXP * core,tests: Updates pending new tests * tests: Updated with new tests * core: revert state transition bugfix * tests: Add expected failures due to #15119
Diffstat (limited to 'core')
-rw-r--r--core/vm/evm.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/vm/evm.go b/core/vm/evm.go
index b0a6f3d26..093c7d4c1 100644
--- a/core/vm/evm.go
+++ b/core/vm/evm.go
@@ -299,9 +299,6 @@ func (evm *EVM) StaticCall(caller ContractRef, addr common.Address, input []byte
// Create creates a new contract using code as deployment code.
func (evm *EVM) Create(caller ContractRef, code []byte, gas uint64, value *big.Int) (ret []byte, contractAddr common.Address, leftOverGas uint64, err error) {
- if evm.vmConfig.NoRecursion && evm.depth > 0 {
- return nil, common.Address{}, gas, nil
- }
// Depth check execution. Fail if we're trying to execute above the
// limit.
@@ -334,6 +331,9 @@ func (evm *EVM) Create(caller ContractRef, code []byte, gas uint64, value *big.I
contract := NewContract(caller, AccountRef(contractAddr), value, gas)
contract.SetCallCode(&contractAddr, crypto.Keccak256Hash(code), code)
+ if evm.vmConfig.NoRecursion && evm.depth > 0 {
+ return nil, contractAddr, gas, nil
+ }
ret, err = run(evm, snapshot, contract, nil)
// check whether the max code size has been exceeded
maxCodeSizeExceeded := evm.ChainConfig().IsEIP158(evm.BlockNumber) && len(ret) > params.MaxCodeSize