rpc: add txHash to debug_traceBlock* results (#9016)

See https://github.com/ethereum/go-ethereum/pull/27183
This commit is contained in:
Andrew Ashikhmin 2023-12-18 15:30:33 +01:00 committed by GitHub
parent a366629f8a
commit 037754a177
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -49,6 +49,7 @@ func TestGeneratedDebugApi(t *testing.T) {
expectedJSON := `
[
{
"txHash": "0xb42edc1d46932ef34be0ba49402dc94e3d2319c066f02945f6828cd344fcfa7b",
"result": {
"calls": [
{

View File

@ -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: