mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
core/vm: fix opReturnContract, don't pay for mem copy
This commit is contained in:
parent
fbec4dca55
commit
abe9f28845
1 changed files with 1 additions and 2 deletions
|
|
@ -661,7 +661,7 @@ func enableEOF(jt *JumpTable) {
|
||||||
jt[RETURNCONTRACT] = &operation{
|
jt[RETURNCONTRACT] = &operation{
|
||||||
execute: opReturnContract,
|
execute: opReturnContract,
|
||||||
constantGas: GasZeroStep,
|
constantGas: GasZeroStep,
|
||||||
dynamicGas: memoryCopierGas(1),
|
dynamicGas: pureMemoryGascost,
|
||||||
minStack: minStack(2, 0),
|
minStack: minStack(2, 0),
|
||||||
maxStack: maxStack(2, 0),
|
maxStack: maxStack(2, 0),
|
||||||
immediate: 1,
|
immediate: 1,
|
||||||
|
|
@ -909,7 +909,6 @@ func opEOFCreate(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) (
|
||||||
stackvalue.SetBytes(addr.Bytes())
|
stackvalue.SetBytes(addr.Bytes())
|
||||||
}
|
}
|
||||||
scope.Stack.push(&stackvalue)
|
scope.Stack.push(&stackvalue)
|
||||||
|
|
||||||
scope.Contract.RefundGas(returnGas, interpreter.evm.Config.Tracer, tracing.GasChangeCallLeftOverRefunded)
|
scope.Contract.RefundGas(returnGas, interpreter.evm.Config.Tracer, tracing.GasChangeCallLeftOverRefunded)
|
||||||
|
|
||||||
if suberr == ErrExecutionReverted {
|
if suberr == ErrExecutionReverted {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue