mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 12:16:44 +00:00
remove static guard from callcode
This commit is contained in:
parent
fb5a848e48
commit
8149ca5eef
1 changed files with 2 additions and 6 deletions
|
|
@ -460,12 +460,8 @@ func gasCallCodeStateless(evm *EVM, contract *Contract, stack *Stack, mem *Memor
|
||||||
overflow bool
|
overflow bool
|
||||||
transfersValue = !stack.Back(2).IsZero()
|
transfersValue = !stack.Back(2).IsZero()
|
||||||
)
|
)
|
||||||
if transfersValue {
|
if transfersValue && !evm.chainRules.IsEIP4762 {
|
||||||
if evm.readOnly {
|
gas += params.CallValueTransferGas
|
||||||
return 0, ErrWriteProtection
|
|
||||||
} else if !evm.chainRules.IsEIP4762 {
|
|
||||||
gas += params.CallValueTransferGas
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if gas, overflow = math.SafeAdd(gas, memoryGas); overflow {
|
if gas, overflow = math.SafeAdd(gas, memoryGas); overflow {
|
||||||
return 0, ErrGasUintOverflow
|
return 0, ErrGasUintOverflow
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue