Skip to content

Commit

Permalink
turn on debug opcodes
Browse files Browse the repository at this point in the history
 - change evm logger to a json logger that writes to stdout

Change-Id: I41d81fe0af298c2f1a29bf253c12ae8350be570c
Signed-off-by: Swetha Repakula <[email protected]>
  • Loading branch information
swetharepakula committed Aug 27, 2019
1 parent b3f0bda commit 27a43d5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion evmcc/evmcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ package main
import (
"encoding/hex"
"fmt"
"os"
"strings"

"github.com/go-kit/kit/log"
"github.com/hyperledger/burrow/acm"
"github.com/hyperledger/burrow/crypto"
"github.com/hyperledger/burrow/execution/evm"
Expand All @@ -35,7 +37,9 @@ var ContractPerms = permission.AccountPermissions{
}

var logger = flogging.MustGetLogger("evmcc")
var evmLogger = logging.NewNoopLogger()

// var evmLogger = logging.NewNoopLogger()
var evmLogger = logging.NewLogger(log.NewJSONLogger(os.Stdout))

type EvmChaincode struct{}

Expand Down Expand Up @@ -96,6 +100,7 @@ func (evmcc *EvmChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response
eventSink := &eventmanager.EventManager{Stub: stub}
nonce := crypto.Nonce(callerAddr, []byte(stub.GetTxID()))
vm := evm.NewVM(newParams(), callerAddr, nonce, evmLogger)
evm.DebugOpcodes(vm)

if calleeAddr == crypto.ZeroAddress {
logger.Debugf("Deploy contract")
Expand Down

0 comments on commit 27a43d5

Please sign in to comment.