mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-20 11:46: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
|
||||
transfersValue = !stack.Back(2).IsZero()
|
||||
)
|
||||
if transfersValue {
|
||||
if evm.readOnly {
|
||||
return 0, ErrWriteProtection
|
||||
} else if !evm.chainRules.IsEIP4762 {
|
||||
gas += params.CallValueTransferGas
|
||||
}
|
||||
if transfersValue && !evm.chainRules.IsEIP4762 {
|
||||
gas += params.CallValueTransferGas
|
||||
}
|
||||
if gas, overflow = math.SafeAdd(gas, memoryGas); overflow {
|
||||
return 0, ErrGasUintOverflow
|
||||
|
|
|
|||
Loading…
Reference in a new issue