mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-13 03:26:38 +00:00
core/rawdb: remove duplicated type storedReceiptRLP (#32820)
Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
parent
d67037a981
commit
168d699fba
1 changed files with 3 additions and 12 deletions
|
|
@ -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
|
// ReceiptLogs is a barebone version of ReceiptForStorage which only keeps
|
||||||
// the list of logs. When decoding a stored receipt into this object we
|
// the list of logs. When decoding a stored receipt into this object we
|
||||||
// avoid creating the bloom filter.
|
// avoid creating the bloom filter.
|
||||||
|
|
@ -682,11 +673,11 @@ type receiptLogs struct {
|
||||||
|
|
||||||
// DecodeRLP implements rlp.Decoder.
|
// DecodeRLP implements rlp.Decoder.
|
||||||
func (r *receiptLogs) DecodeRLP(s *rlp.Stream) error {
|
func (r *receiptLogs) DecodeRLP(s *rlp.Stream) error {
|
||||||
var stored storedReceiptRLP
|
var rs types.ReceiptForStorage
|
||||||
if err := s.Decode(&stored); err != nil {
|
if err := rs.DecodeRLP(s); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
r.Logs = stored.Logs
|
r.Logs = rs.Logs
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue