From a0b84f612d93993207507fd6898a63d9084833fb Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 28 Nov 2017 13:37:48 +0100 Subject: [PATCH] core/vm: pop call gas into pool --- core/vm/instructions.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/vm/instructions.go b/core/vm/instructions.go index 175fe12a84..fdd1f75a64 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -604,7 +604,7 @@ func opCreate(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *S func opCall(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) { // Pop gas. The actual gas in in evm.callGasTemp. - stack.pop() + evm.interpreter.intPool.put(stack.pop()) gas := evm.callGasTemp // Pop other call parameters. addr, value, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() @@ -633,7 +633,7 @@ func opCall(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Sta func opCallCode(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) { // Pop gas. The actual gas is in evm.callGasTemp. - stack.pop() + evm.interpreter.intPool.put(stack.pop()) gas := evm.callGasTemp // Pop other call parameters. addr, value, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() @@ -662,7 +662,7 @@ func opCallCode(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack func opDelegateCall(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) { // Pop gas. The actual gas is in evm.callGasTemp. - stack.pop() + evm.interpreter.intPool.put(stack.pop()) gas := evm.callGasTemp // Pop other call parameters. to, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop() @@ -687,7 +687,7 @@ func opDelegateCall(pc *uint64, evm *EVM, contract *Contract, memory *Memory, st func opStaticCall(pc *uint64, evm *EVM, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) { // Pop gas. The actual gas is in evm.callGasTemp. - stack.pop() + evm.interpreter.intPool.put(stack.pop()) gas := evm.callGasTemp // Pop other call parameters. addr, inOffset, inSize, retOffset, retSize := stack.pop(), stack.pop(), stack.pop(), stack.pop(), stack.pop()