diff --git a/eth/tracers/api.go b/eth/tracers/api.go index 574ccb60de..477eae9eb0 100644 --- a/eth/tracers/api.go +++ b/eth/tracers/api.go @@ -455,6 +455,9 @@ func (api *API) TraceBlockByNumber(ctx context.Context, number rpc.BlockNumber, if err != nil { return nil, fmt.Errorf("historical backend error: %w", err) } + for i, tx := range block.Transactions() { + histResult[i].TxHash = tx.Hash() + } return histResult, nil } else { return nil, rpc.ErrNoHistoricalFallback @@ -479,6 +482,9 @@ func (api *API) TraceBlockByHash(ctx context.Context, hash common.Hash, config * if err != nil { return nil, fmt.Errorf("historical backend error: %w", err) } + for i, tx := range block.Transactions() { + histResult[i].TxHash = tx.Hash() + } return histResult, nil } else { return nil, rpc.ErrNoHistoricalFallback