Skip to content

Commit

Permalink
rpc: add txHash to debug_traceBlock* results (#9016)
Browse files Browse the repository at this point in the history
  • Loading branch information
yperbasis committed Dec 18, 2023
1 parent a366629 commit 037754a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions turbo/jsonrpc/gen_traces_test.go
Expand Up @@ -49,6 +49,7 @@ func TestGeneratedDebugApi(t *testing.T) {
expectedJSON := `
[
{
"txHash": "0xb42edc1d46932ef34be0ba49402dc94e3d2319c066f02945f6828cd344fcfa7b",
"result": {
"calls": [
{
Expand Down
3 changes: 3 additions & 0 deletions turbo/jsonrpc/tracing.go
Expand Up @@ -111,6 +111,9 @@ func (api *PrivateDebugAPIImpl) traceBlock(ctx context.Context, blockNrOrHash rp

for idx, txn := range txns {
stream.WriteObjectStart()
stream.WriteObjectField("txHash")
stream.WriteString(txn.Hash().Hex())
stream.WriteMore()
stream.WriteObjectField("result")
select {
default:
Expand Down

0 comments on commit 037754a

Please sign in to comment.