mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd/evm: keep json
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
a290bab86c
commit
3adc0c46eb
2 changed files with 2 additions and 2 deletions
|
|
@ -28,7 +28,7 @@ import (
|
||||||
var (
|
var (
|
||||||
TraceFlag = &cli.BoolFlag{
|
TraceFlag = &cli.BoolFlag{
|
||||||
Name: "trace",
|
Name: "trace",
|
||||||
Usage: "Output full trace logs to a file named: trace-<txIndex>-<txhash>.jsonl",
|
Usage: "Output full trace logs to a file named: trace-<txIndex>-<txHash>.json or trace-<txIndex>-<txHash>.jsonl",
|
||||||
}
|
}
|
||||||
TraceTracerFlag = &cli.StringFlag{
|
TraceTracerFlag = &cli.StringFlag{
|
||||||
Name: "trace.tracer",
|
Name: "trace.tracer",
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ func Transition(ctx *cli.Context) error {
|
||||||
return NewError(ErrorConfig, fmt.Errorf("failed instantiating tracer: %w", err))
|
return NewError(ErrorConfig, fmt.Errorf("failed instantiating tracer: %w", err))
|
||||||
}
|
}
|
||||||
getTracer = func(txIndex int, txHash common.Hash) (vm.EVMLogger, error) {
|
getTracer = func(txIndex int, txHash common.Hash) (vm.EVMLogger, error) {
|
||||||
traceFile, err := os.Create(path.Join(baseDir, fmt.Sprintf("trace-%d-%v.jsonl", txIndex, txHash.String())))
|
traceFile, err := os.Create(path.Join(baseDir, fmt.Sprintf("trace-%d-%v.json", txIndex, txHash.String())))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, NewError(ErrorIO, fmt.Errorf("failed creating trace-file: %v", err))
|
return nil, NewError(ErrorIO, fmt.Errorf("failed creating trace-file: %v", err))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue