Skip to content

Commit

Permalink
Add RLP receipts to trace
Browse files Browse the repository at this point in the history
  • Loading branch information
vcastellm committed Sep 29, 2023
1 parent 781c691 commit 9071047
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions state/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ func (t *Transition) Write(txn *types.Transaction) error {

txnTrace := &types.TxnTrace{
Transaction: txn.MarshalRLP(),
Receipt: receipt.MarshalRLP(),
Delta: t.Txn().GetCompactJournal(),
Hash: txn.Hash,
GasUsed: result.GasUsed,
Expand Down
3 changes: 3 additions & 0 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ type TxnTrace struct {
// ReceiptRoot is the root of the trie of receipts for this transaction
ReceiptRoot Hash `json:"receiptRoot"`

// Receipt is the RLP encoding of the receipt for this transaction
Receipt ArgBytes `json:"receipt"`

// TxnRoot is the root of the trie of transactions for this block
TxnRoot Hash `json:"txnRoot,omitempty"`

Expand Down

0 comments on commit 9071047

Please sign in to comment.