Skip to content

Commit

Permalink
Merge pull request #79 from testinprod-io/pcw109550/fix-call-trace-api
Browse files Browse the repository at this point in the history
Fix trace relay to support arbitrary response type
  • Loading branch information
pcw109550 authored Jul 14, 2023
2 parents 0fb48c7 + ee02941 commit 651f397
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/rpcdaemon/commands/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ func (api *PrivateDebugAPIImpl) TraceTransaction(ctx context.Context, hash commo
if api.historicalRPCService == nil {
return rpc.ErrNoHistoricalFallback
}
treeResult := &GethTrace{}
if err := api.relayToHistoricalBackend(ctx, treeResult, "debug_traceTransaction", hash, config); err != nil {
var traceResult interface{}
if err := api.relayToHistoricalBackend(ctx, &traceResult, "debug_traceTransaction", hash, config); err != nil {
return fmt.Errorf("historical backend error: %w", err)
}
// stream out relayed response
result, err := json.Marshal(treeResult)
result, err := json.Marshal(traceResult)
if err != nil {
return err
}
Expand Down

0 comments on commit 651f397

Please sign in to comment.