Skip to content

Commit

Permalink
mix func DecodeRLP
Browse files Browse the repository at this point in the history
  • Loading branch information
JukLee0ira committed Sep 19, 2024
1 parent cd85f0f commit 56fa4ca
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions core/types/receipt.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,16 +252,7 @@ func (r *ReceiptForStorage) DecodeRLP(s *rlp.Stream) error {
if err != nil {
return err
}
// Try decoding from the newest format for future proofness, then the older one
// for old nodes that just upgraded. V4 was an intermediate unreleased format so
// we do need to decode it, but it's not common (try last).
if err := decodeStoredReceiptRLP(r, blob); err == nil {
return nil
}
return decodeStoredReceiptRLP(r, blob)
}

func decodeStoredReceiptRLP(r *ReceiptForStorage, blob []byte) error {
var stored StoredReceiptRLP
if err := rlp.DecodeBytes(blob, &stored); err != nil {
return err
Expand Down

0 comments on commit 56fa4ca

Please sign in to comment.