cmd/evm: keep json

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
jsvisa 2023-12-15 15:15:00 +08:00
parent a290bab86c
commit 3adc0c46eb
2 changed files with 2 additions and 2 deletions

View file

@ -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",

View file

@ -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))
} }