mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
core/vm: fix condition
This commit is contained in:
parent
370af2ed06
commit
6a077c6e01
1 changed files with 8 additions and 4 deletions
|
|
@ -526,11 +526,15 @@ func (evm *EVM) initNewContract(contract *Contract, address common.Address) ([]b
|
|||
}
|
||||
|
||||
// Check whether the max code size has been exceeded, assign err if the case.
|
||||
if evm.chainRules.IsOsaka && len(ret) > params.MaxCodeSizeOsaka {
|
||||
if evm.chainRules.IsOsaka {
|
||||
if len(ret) > params.MaxCodeSizeOsaka {
|
||||
return ret, ErrMaxCodeSizeExceeded
|
||||
} else if evm.chainRules.IsEIP158 && len(ret) > params.MaxCodeSize {
|
||||
}
|
||||
} else if evm.chainRules.IsEIP158 {
|
||||
if len(ret) > params.MaxCodeSize {
|
||||
return ret, ErrMaxCodeSizeExceeded
|
||||
}
|
||||
}
|
||||
|
||||
// Reject code starting with 0xEF if EIP-3541 is enabled.
|
||||
if len(ret) >= 1 && ret[0] == 0xEF && evm.chainRules.IsLondon {
|
||||
|
|
|
|||
Loading…
Reference in a new issue