Skip to content

Commit

Permalink
Rename receipt storage variable
Browse files Browse the repository at this point in the history
  • Loading branch information
austinabell committed Aug 9, 2019
1 parent 3abe088 commit fb0f6d3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/types/receipt.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ type storedReceiptRLP struct {
GasUsed *big.Int
}

// storedReceiptRLPv2 is the storage encoding of a receipt.
type storedReceiptRLPv2 struct {
// storedReceiptRLPWithStatus is the storage encoding of a receipt.
type storedReceiptRLPWithStatus struct {
PostState []byte
CumulativeGasUsed *big.Int
Bloom Bloom
Expand Down Expand Up @@ -159,7 +159,7 @@ func (r *ReceiptForStorage) EncodeRLP(w io.Writer) error {
for i, log := range r.Logs {
logs[i] = (*vm.LogForStorage)(log)
}
receiptToStore := &storedReceiptRLPv2{
receiptToStore := &storedReceiptRLPWithStatus{
PostState: r.PostState,
CumulativeGasUsed: r.CumulativeGasUsed,
Logs: logs,
Expand All @@ -181,7 +181,7 @@ func (r *ReceiptForStorage) DecodeRLP(s *rlp.Stream) error {
}

// Try decoding the receipt with Status first
if err := decodeStoredReceiptRLPv2(r, raw); err == nil {
if err := decodeStoredReceiptRLPWithStatus(r, raw); err == nil {
return nil
}

Expand Down Expand Up @@ -226,8 +226,8 @@ func (r *ReceiptForStorage) decodePostStateOrStatus(sr storedReceiptRLP) {
}

// Decode with status field included in storage
func decodeStoredReceiptRLPv2(r *ReceiptForStorage, raw []byte) error {
var receipt storedReceiptRLPv2
func decodeStoredReceiptRLPWithStatus(r *ReceiptForStorage, raw []byte) error {
var receipt storedReceiptRLPWithStatus
if err := rlp.DecodeBytes(raw, &receipt); err != nil {
return err
}
Expand Down

0 comments on commit fb0f6d3

Please sign in to comment.