diff options
author | Martin Holst Swende <martin@swende.se> | 2017-06-21 20:52:31 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2017-06-21 20:52:31 +0800 |
commit | 9a44e1035ed72eec121cf6fbe38761eea20e09c6 (patch) | |
tree | 17f5dbc5267d47bc88126bf23776c4a0b42fc348 /cmd/evm/runner.go | |
parent | 9012863ad78bca17f768b83324be8a26ddb34657 (diff) | |
download | dexon-9a44e1035ed72eec121cf6fbe38761eea20e09c6.tar.gz dexon-9a44e1035ed72eec121cf6fbe38761eea20e09c6.tar.zst dexon-9a44e1035ed72eec121cf6fbe38761eea20e09c6.zip |
cmd/evm, core/vm: add --nomemory, --nostack to evm (#14617)
Diffstat (limited to 'cmd/evm/runner.go')
-rw-r--r-- | cmd/evm/runner.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cmd/evm/runner.go b/cmd/evm/runner.go index b1fb8998f..2ce0920f6 100644 --- a/cmd/evm/runner.go +++ b/cmd/evm/runner.go @@ -73,6 +73,10 @@ func runCmd(ctx *cli.Context) error { glogger := log.NewGlogHandler(log.StreamHandler(os.Stderr, log.TerminalFormat(false))) glogger.Verbosity(log.Lvl(ctx.GlobalInt(VerbosityFlag.Name))) log.Root().SetHandler(glogger) + logconfig := &vm.LogConfig{ + DisableMemory: ctx.GlobalBool(DisableMemoryFlag.Name), + DisableStack: ctx.GlobalBool(DisableStackFlag.Name), + } var ( tracer vm.Tracer @@ -82,12 +86,12 @@ func runCmd(ctx *cli.Context) error { sender = common.StringToAddress("sender") ) if ctx.GlobalBool(MachineFlag.Name) { - tracer = NewJSONLogger(os.Stdout) + tracer = NewJSONLogger(logconfig, os.Stdout) } else if ctx.GlobalBool(DebugFlag.Name) { - debugLogger = vm.NewStructLogger(nil) + debugLogger = vm.NewStructLogger(logconfig) tracer = debugLogger } else { - debugLogger = vm.NewStructLogger(nil) + debugLogger = vm.NewStructLogger(logconfig) } if ctx.GlobalString(GenesisFlag.Name) != "" { gen := readGenesis(ctx.GlobalString(GenesisFlag.Name)) |