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,10 +526,14 @@ func (evm *EVM) initNewContract(contract *Contract, address common.Address) ([]b
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check whether the max code size has been exceeded, assign err if the case.
|
// 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 {
|
||||||
return ret, ErrMaxCodeSizeExceeded
|
if len(ret) > params.MaxCodeSizeOsaka {
|
||||||
} else if evm.chainRules.IsEIP158 && len(ret) > params.MaxCodeSize {
|
return ret, ErrMaxCodeSizeExceeded
|
||||||
return ret, ErrMaxCodeSizeExceeded
|
}
|
||||||
|
} else if evm.chainRules.IsEIP158 {
|
||||||
|
if len(ret) > params.MaxCodeSize {
|
||||||
|
return ret, ErrMaxCodeSizeExceeded
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reject code starting with 0xEF if EIP-3541 is enabled.
|
// Reject code starting with 0xEF if EIP-3541 is enabled.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue