@ -19,7 +19,6 @@ package vm
import (
"math/big"
"sync/atomic"
"time"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
@ -183,7 +182,7 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas
if evm . Config . Debug {
if evm . depth == 0 {
evm . Config . Tracer . CaptureStart ( evm , caller . Address ( ) , addr , false , input , gas , value )
evm . Config . Tracer . CaptureEnd ( ret , 0 , 0 , nil )
evm . Config . Tracer . CaptureEnd ( ret , 0 , nil )
} else {
evm . Config . Tracer . CaptureEnter ( CALL , caller . Address ( ) , addr , input , gas , value )
evm . Config . Tracer . CaptureExit ( ret , 0 , nil )
@ -199,9 +198,9 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas
if evm . Config . Debug {
if evm . depth == 0 {
evm . Config . Tracer . CaptureStart ( evm , caller . Address ( ) , addr , false , input , gas , value )
defer func ( startGas uint64 , startTime time . Time ) { // Lazy evaluation of the parameters
evm . Config . Tracer . CaptureEnd ( ret , startGas - gas , time . Since ( startTime ) , err )
} ( gas , time . Now ( ) )
defer func ( startGas uint64 ) { // Lazy evaluation of the parameters
evm . Config . Tracer . CaptureEnd ( ret , startGas - gas , err )
} ( gas )
} else {
// Handle tracer events for entering and exiting a call frame
evm . Config . Tracer . CaptureEnter ( CALL , caller . Address ( ) , addr , input , gas , value )
@ -448,8 +447,6 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64,
}
}
start := time . Now ( )
ret , err := evm . interpreter . Run ( contract , nil , false )
// Check whether the max code size has been exceeded, assign err if the case.
@ -487,7 +484,7 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64,
if evm . Config . Debug {
if evm . depth == 0 {
evm . Config . Tracer . CaptureEnd ( ret , gas - contract . Gas , time . Since ( start ) , err )
evm . Config . Tracer . CaptureEnd ( ret , gas - contract . Gas , err )
} else {
evm . Config . Tracer . CaptureExit ( ret , gas - contract . Gas , err )
}