Skip to content

Commit dece49f

Browse files
henridffjl
authored andcommitted
core/types: improve LogForStorage and ReceiptForStorage comments (ethereum#25032)
Co-authored-by: Felix Lange <[email protected]>
1 parent 641185d commit dece49f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

core/types/log.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ func (l *Log) DecodeRLP(s *rlp.Stream) error {
9898
return err
9999
}
100100

101-
// LogForStorage is a wrapper around a Log that flattens and parses the entire content of
102-
// a log including non-consensus fields.
101+
// LogForStorage is a wrapper around a Log that handles
102+
// backward compatibility with prior storage formats.
103103
type LogForStorage Log
104104

105105
// EncodeRLP implements rlp.Encoder.

core/types/receipt.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@ func (r *Receipt) Size() common.StorageSize {
267267
return size
268268
}
269269

270-
// ReceiptForStorage is a wrapper around a Receipt that flattens and parses the
271-
// entire content of a receipt, as opposed to only the consensus fields originally.
270+
// ReceiptForStorage is a wrapper around a Receipt with RLP serialization
271+
// that omits the Bloom field and deserialization that re-computes it.
272272
type ReceiptForStorage Receipt
273273

274274
// EncodeRLP implements rlp.Encoder, and flattens all content fields of a receipt

0 commit comments

Comments
 (0)