@@ -20,6 +20,7 @@ import (
2020 "bytes"
2121 "fmt"
2222 "io"
23+ "math/big"
2324 "unsafe"
2425
2526 "github.com/ethereum/go-ethereum/common"
@@ -44,24 +45,33 @@ const (
4445
4546// Receipt represents the results of a transaction.
4647type Receipt struct {
47- // Consensus fields
48+ // Consensus fields: These fields are defined by the Yellow Paper
4849 PostState []byte `json:"root"`
4950 Status uint64 `json:"status"`
5051 CumulativeGasUsed uint64 `json:"cumulativeGasUsed" gencodec:"required"`
5152 Bloom Bloom `json:"logsBloom" gencodec:"required"`
5253 Logs []* Log `json:"logs" gencodec:"required"`
5354
54- // Implementation fields (don't reorder!)
55+ // Implementation fields: These fields are added by geth when processing a transaction.
56+ // They are stored in the chain database.
5557 TxHash common.Hash `json:"transactionHash" gencodec:"required"`
5658 ContractAddress common.Address `json:"contractAddress"`
5759 GasUsed uint64 `json:"gasUsed" gencodec:"required"`
60+
61+ // Inclusion information: These fields provide information about the inclusion of the
62+ // transaction corresponding to this receipt.
63+ BlockHash common.Hash `json:"blockHash,omitempty"`
64+ BlockNumber * big.Int `json:"blockNumber,omitempty"`
65+ TransactionIndex uint `json:"transactionIndex"`
5866}
5967
6068type receiptMarshaling struct {
6169 PostState hexutil.Bytes
6270 Status hexutil.Uint64
6371 CumulativeGasUsed hexutil.Uint64
6472 GasUsed hexutil.Uint64
73+ BlockNumber * hexutil.Big
74+ TransactionIndex hexutil.Uint
6575}
6676
6777// receiptRLP is the consensus encoding of a receipt.
0 commit comments