From a5280f182767a4b18500f65c5ac934e7e2566c96 Mon Sep 17 00:00:00 2001 From: henridf Date: Wed, 8 Jun 2022 18:32:07 +0200 Subject: [PATCH] core/types: improve LogForStorage and ReceiptForStorage comments (#25032) Co-authored-by: Felix Lange --- core/types/log.go | 4 ++-- core/types/receipt.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/types/log.go b/core/types/log.go index ee323ba868041..eb30957b12788 100644 --- a/core/types/log.go +++ b/core/types/log.go @@ -98,8 +98,8 @@ func (l *Log) DecodeRLP(s *rlp.Stream) error { return err } -// LogForStorage is a wrapper around a Log that flattens and parses the entire content of -// a log including non-consensus fields. +// LogForStorage is a wrapper around a Log that handles +// backward compatibility with prior storage formats. type LogForStorage Log // EncodeRLP implements rlp.Encoder. diff --git a/core/types/receipt.go b/core/types/receipt.go index a913cd0e83be9..bdf48451473c3 100644 --- a/core/types/receipt.go +++ b/core/types/receipt.go @@ -267,8 +267,8 @@ func (r *Receipt) Size() common.StorageSize { return size } -// ReceiptForStorage is a wrapper around a Receipt that flattens and parses the -// entire content of a receipt, as opposed to only the consensus fields originally. +// ReceiptForStorage is a wrapper around a Receipt with RLP serialization +// that omits the Bloom field and deserialization that re-computes it. type ReceiptForStorage Receipt // EncodeRLP implements rlp.Encoder, and flattens all content fields of a receipt