From dd76f3425a617859381db59ebba6748c1c29db11 Mon Sep 17 00:00:00 2001 From: maskpp Date: Mon, 15 Aug 2022 16:43:08 +0800 Subject: [PATCH] feat: add `txHash` in `blockResult` (#142) add txHash in blockResult --- core/types/l2trace_block.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/types/l2trace_block.go b/core/types/l2trace_block.go index 93b6f089aa..b9c09e424f 100644 --- a/core/types/l2trace_block.go +++ b/core/types/l2trace_block.go @@ -22,6 +22,7 @@ type BlockTrace struct { type TransactionTrace struct { Type uint8 `json:"type"` Nonce uint64 `json:"nonce"` + TxHash string `json:"txHash"` Gas uint64 `json:"gas"` GasPrice *hexutil.Big `json:"gasPrice"` From common.Address `json:"from"` @@ -62,6 +63,7 @@ func newTraceTransaction(tx *Transaction, blockNumber uint64, config *params.Cha v, r, s := tx.RawSignatureValues() result := &TransactionTrace{ Type: tx.Type(), + TxHash: tx.Hash().String(), Nonce: tx.Nonce(), ChainId: (*hexutil.Big)(tx.ChainId()), From: from,