From ec41df0dbab88832a25891ac55673a3a23fc9c3c Mon Sep 17 00:00:00 2001 From: sashass1315 Date: Thu, 2 Oct 2025 11:52:04 +0300 Subject: [PATCH] core/rawdb: remove duplicated storedReceiptRLP and decode via types.ReceiptForStorage --- core/rawdb/accessors_chain.go | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/core/rawdb/accessors_chain.go b/core/rawdb/accessors_chain.go index 0782a0e7dac..92d65b64659 100644 --- a/core/rawdb/accessors_chain.go +++ b/core/rawdb/accessors_chain.go @@ -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 := s.Decode(&rs); err != nil { return err } - r.Logs = stored.Logs + r.Logs = rs.Logs return nil }