From 0bdd2e0575a2b5741b757a9966120ef83ecddbad Mon Sep 17 00:00:00 2001 From: maskpp Date: Mon, 21 Nov 2022 12:37:53 +0800 Subject: [PATCH] fix(tx): fix bug in `*TransactionData` `UnmarshalJSON` (#184) * Fix bug for TransactionData json unmarshal * clean up Co-authored-by: HAOYUatHZ --- core/types/l2trace_block.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/types/l2trace_block.go b/core/types/l2trace_block.go index 3e643383d0..1f45e437fd 100644 --- a/core/types/l2trace_block.go +++ b/core/types/l2trace_block.go @@ -10,7 +10,7 @@ import ( type TransactionData struct { IsCreate bool `json:"isCreate"` From common.Address `json:"from"` - *Transaction + Transaction } // NewTraceTransaction returns a transaction that will serialize to the trace @@ -21,6 +21,6 @@ func NewTraceTransaction(tx *Transaction, blockNumber uint64, config *params.Cha return &TransactionData{ From: from, IsCreate: tx.To() == nil, - Transaction: tx, + Transaction: *tx, } }