core/rawdb: remove duplicated type storedReceiptRLP (#32820)
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run

Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
sashass1315 2025-10-08 12:29:51 +03:00 committed by GitHub
parent d67037a981
commit 168d699fba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -664,15 +664,6 @@ func DeleteReceipts(db ethdb.KeyValueWriter, hash common.Hash, number uint64) {
}
}
// storedReceiptRLP is the storage encoding of a receipt.
// Re-definition in core/types/receipt.go.
// TODO: Re-use the existing definition.
type storedReceiptRLP struct {
PostStateOrStatus []byte
CumulativeGasUsed uint64
Logs []*types.Log
}
// ReceiptLogs is a barebone version of ReceiptForStorage which only keeps
// the list of logs. When decoding a stored receipt into this object we
// avoid creating the bloom filter.
@ -682,11 +673,11 @@ type receiptLogs struct {
// DecodeRLP implements rlp.Decoder.
func (r *receiptLogs) DecodeRLP(s *rlp.Stream) error {
var stored storedReceiptRLP
if err := s.Decode(&stored); err != nil {
var rs types.ReceiptForStorage
if err := rs.DecodeRLP(s); err != nil {
return err
}
r.Logs = stored.Logs
r.Logs = rs.Logs
return nil
}