Skip to content

Commit 037754a

Browse files
authored
rpc: add txHash to debug_traceBlock* results (#9016)
See ethereum/go-ethereum#27183
1 parent a366629 commit 037754a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

turbo/jsonrpc/gen_traces_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ func TestGeneratedDebugApi(t *testing.T) {
4949
expectedJSON := `
5050
[
5151
{
52+
"txHash": "0xb42edc1d46932ef34be0ba49402dc94e3d2319c066f02945f6828cd344fcfa7b",
5253
"result": {
5354
"calls": [
5455
{

turbo/jsonrpc/tracing.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ func (api *PrivateDebugAPIImpl) traceBlock(ctx context.Context, blockNrOrHash rp
111111

112112
for idx, txn := range txns {
113113
stream.WriteObjectStart()
114+
stream.WriteObjectField("txHash")
115+
stream.WriteString(txn.Hash().Hex())
116+
stream.WriteMore()
114117
stream.WriteObjectField("result")
115118
select {
116119
default:

0 commit comments

Comments
 (0)