diff options
author | rjl493456442 <garyrong0905@gmail.com> | 2017-08-21 08:47:15 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2017-08-22 23:35:17 +0800 |
commit | 28aea46ac08579f3ecd1c35620915b8e1bfcc8b0 (patch) | |
tree | a2d00f77c624c5c255af1d05873eb3c5b0f17591 /core/vm/evm.go | |
parent | 2fd5ba6bd41380cf0e21d3ec0ca4bbc4aa7b6c34 (diff) | |
download | dexon-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar dexon-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.gz dexon-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.bz2 dexon-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.lz dexon-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.xz dexon-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.tar.zst dexon-28aea46ac08579f3ecd1c35620915b8e1bfcc8b0.zip |
core: implement Metropolis EIP 658, receipt status byte
Diffstat (limited to 'core/vm/evm.go')
-rw-r--r-- | core/vm/evm.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/vm/evm.go b/core/vm/evm.go index 8d654c666..34933a1dc 100644 --- a/core/vm/evm.go +++ b/core/vm/evm.go @@ -158,7 +158,7 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas evm.Transfer(evm.StateDB, caller.Address(), to.Address(), value) // initialise a new contract and set the code that is to be used by the - // E The contract is a scoped evmironment for this execution context + // E The contract is a scoped environment for this execution context // only. contract := NewContract(caller, to, value, gas) contract.SetCallCode(&addr, evm.StateDB.GetCodeHash(addr), evm.StateDB.GetCode(addr)) @@ -351,6 +351,10 @@ func (evm *EVM) Create(caller ContractRef, code []byte, gas uint64, value *big.I contract.UseGas(contract.Gas) } } + // Assign err if contract code size exceeds the max while the err is still empty. + if maxCodeSizeExceeded && err == nil { + err = errMaxCodeSizeExceeded + } return ret, contractAddr, contract.Gas, err } |