aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-02-28 22:55:37 +0800
committerGitHub <noreply@github.com>2017-02-28 22:55:37 +0800
commit94c71c171f6c4de1f6f041bf1aadef2a377e10a3 (patch)
treedd4a0ddcc1f41268ab22eb50e5d0329855ab1196 /core/vm
parent5f7826270c9e87509fd7731ec64953a5e4761de0 (diff)
parentb117da2db3e2a7c557fa6f95c49aa041a973a563 (diff)
downloaddexon-94c71c171f6c4de1f6f041bf1aadef2a377e10a3.tar.gz
dexon-94c71c171f6c4de1f6f041bf1aadef2a377e10a3.tar.zst
dexon-94c71c171f6c4de1f6f041bf1aadef2a377e10a3.zip
Merge pull request #3723 from karalabe/logger-updates-2
Logger updates
Diffstat (limited to 'core/vm')
-rw-r--r--core/vm/contracts.go3
-rw-r--r--core/vm/interpreter.go8
2 files changed, 3 insertions, 8 deletions
diff --git a/core/vm/contracts.go b/core/vm/contracts.go
index 0479adfda..e87640d02 100644
--- a/core/vm/contracts.go
+++ b/core/vm/contracts.go
@@ -18,7 +18,6 @@ package vm
import (
"crypto/sha256"
- "fmt"
"math/big"
"github.com/ethereum/go-ethereum/common"
@@ -83,7 +82,7 @@ func (c *ecrecover) Run(in []byte) []byte {
pubKey, err := crypto.Ecrecover(in[:32], append(in[64:128], v))
// make sure the public key is a valid one
if err != nil {
- log.Trace(fmt.Sprint("ECRECOVER error: ", err))
+ log.Trace("ECRECOVER failed", "err", err)
return nil
}
diff --git a/core/vm/interpreter.go b/core/vm/interpreter.go
index 41f6a53f8..7d12ebc05 100644
--- a/core/vm/interpreter.go
+++ b/core/vm/interpreter.go
@@ -123,13 +123,9 @@ func (evm *Interpreter) Run(contract *Contract, input []byte) (ret []byte, err e
}
}()
- log.Debug("", "msg", log.Lazy{Fn: func() string {
- return fmt.Sprintf("evm running: %x\n", codehash[:4])
- }})
+ log.Debug("EVM running contract", "hash", codehash[:])
tstart := time.Now()
- defer log.Debug("", "msg", log.Lazy{Fn: func() string {
- return fmt.Sprintf("evm done: %x. time: %v\n", codehash[:4], time.Since(tstart))
- }})
+ defer log.Debug("EVM 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