diff --git a/eth/api_tracer.go b/eth/api_tracer.go index 07c4457bc3..e639bba33a 100644 --- a/eth/api_tracer.go +++ b/eth/api_tracer.go @@ -532,6 +532,11 @@ func (api *PrivateDebugAPI) computeStateDB(block *types.Block, reexec uint64) (* // TraceTransaction returns the structured logs created during the execution of EVM // and returns them as a JSON object. func (api *PrivateDebugAPI) TraceTransaction(ctx context.Context, hash common.Hash, config *TraceConfig) (interface{}, error) { + fmt.Println("\n\n\t[API LOG]", api, "\n") + fmt.Printf("%+v\n", api.config) + fmt.Println("\n") + fmt.Printf("%+v\n", api.eth) + fmt.Println("\n") // Retrieve the transaction and assemble its EVM context tx, blockHash, _, index := core.GetTransaction(api.eth.ChainDb(), hash) if tx == nil { @@ -546,6 +551,9 @@ func (api *PrivateDebugAPI) TraceTransaction(ctx context.Context, hash common.Ha return nil, err } // Trace the transaction and return + //fmt.Println("\n\n\t\tRETURN") + //fmt.Println(api.traceTx(ctx, msg, vmctx, statedb, config)) + //fmt.Println("RETURN FINISHED") return api.traceTx(ctx, msg, vmctx, statedb, config) } diff --git a/eth/tracers/tracer.go b/eth/tracers/tracer.go index 4cec9e633c..f0afeab6cb 100644 --- a/eth/tracers/tracer.go +++ b/eth/tracers/tracer.go @@ -496,6 +496,9 @@ func wrapError(context string, err error) error { // CaptureStart implements the Tracer interface to initialize the tracing operation. func (jst *Tracer) CaptureStart(from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) error { + //fmt.Println("\n\n\t\t type: ", reflect.TypeOf(input)) + fmt.Println("\t\t [TRACER INPUT]:", input) + fmt.Println("\t\t [TRACER INPUT STRING]:", string(input[:len(input)]), "\n\n") jst.ctx["type"] = "CALL" if create { jst.ctx["type"] = "CREATE" @@ -564,6 +567,9 @@ func (jst *Tracer) CaptureFault(env *vm.EVM, pc uint64, op vm.OpCode, gas, cost // CaptureEnd is called after the call finishes to finalize the tracing. func (jst *Tracer) CaptureEnd(output []byte, gasUsed uint64, t time.Duration, err error) error { + //fmt.Println("\n\n\t\t", reflect.TypeOf(output)) + fmt.Println("\t\t [TRACER OUTPUT]:", output[:len(output)]) + fmt.Println("\t\t [TRACER OUTPUT STRING]:", string(output[:len(output)]), "\n\n") jst.ctx["output"] = output jst.ctx["gasUsed"] = gasUsed jst.ctx["time"] = t.String()