aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/interpreter.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@users.noreply.github.com>2017-07-19 20:32:45 +0800
committerGitHub <noreply@github.com>2017-07-19 20:32:45 +0800
commit3e0dbe0eaa723580a86a6a2f18ab744387d4235e (patch)
tree73b59c17c2c69be82c1af8ea5399706e0fcd993e /core/vm/interpreter.go
parent1802682f65655a69cb17c21113100bac16539192 (diff)
downloaddexon-3e0dbe0eaa723580a86a6a2f18ab744387d4235e.tar
dexon-3e0dbe0eaa723580a86a6a2f18ab744387d4235e.tar.gz
dexon-3e0dbe0eaa723580a86a6a2f18ab744387d4235e.tar.bz2
dexon-3e0dbe0eaa723580a86a6a2f18ab744387d4235e.tar.lz
dexon-3e0dbe0eaa723580a86a6a2f18ab744387d4235e.tar.xz
dexon-3e0dbe0eaa723580a86a6a2f18ab744387d4235e.tar.zst
dexon-3e0dbe0eaa723580a86a6a2f18ab744387d4235e.zip
core/vm: remove logging and add section labels to struct logs (#14782)
Diffstat (limited to 'core/vm/interpreter.go')
-rw-r--r--core/vm/interpreter.go11
1 files changed, 0 insertions, 11 deletions
diff --git a/core/vm/interpreter.go b/core/vm/interpreter.go
index 545f7d650..0a225bca4 100644
--- a/core/vm/interpreter.go
+++ b/core/vm/interpreter.go
@@ -19,12 +19,10 @@ package vm
import (
"fmt"
"sync/atomic"
- "time"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
"github.com/ethereum/go-ethereum/crypto"
- "github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
)
@@ -122,19 +120,12 @@ func (in *Interpreter) Run(snapshot int, contract *Contract, input []byte) (ret
)
contract.Input = input
- // User defer pattern to check for an error and, based on the error being nil or not, use all gas and return.
defer func() {
if err != nil && in.cfg.Debug {
- // XXX For debugging
- //fmt.Printf("%04d: %8v cost = %-8d stack = %-8d ERR = %v\n", pc, op, cost, stack.len(), err)
in.cfg.Tracer.CaptureState(in.evm, pc, op, contract.Gas, cost, mem, stack, contract, in.evm.depth, err)
}
}()
- log.Debug("interpreter running contract", "hash", codehash[:])
- tstart := time.Now()
- defer log.Debug("interpreter finished running contract", "hash", codehash[:], "elapsed", time.Since(tstart))
-
// The Interpreter main run loop (contextual). This loop runs until either an
// explicit STOP, RETURN or SELFDESTRUCT is executed, an error occurred during
// the execution of one of the operations or until the done flag is set by the
@@ -190,8 +181,6 @@ func (in *Interpreter) Run(snapshot int, contract *Contract, input []byte) (ret
if in.cfg.Debug {
in.cfg.Tracer.CaptureState(in.evm, pc, op, contract.Gas, cost, mem, stack, contract, in.evm.depth, err)
}
- // XXX For debugging
- //fmt.Printf("%04d: %8v cost = %-8d stack = %-8d\n", pc, op, cost, stack.len())
// execute the operation
res, err := operation.execute(&pc, in.evm, contract, mem, stack)