Skip to content

Commit

Permalink
Merge pull request #342 from onflow/patch-storage-receipt-decoding
Browse files Browse the repository at this point in the history
Patch `models.StorageReceipt` decoding
  • Loading branch information
sideninja authored Jul 9, 2024
2 parents 9d875ae + 8f28a50 commit 56c5fcb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion storage/pebble/receipts.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,12 @@ func (r *Receipts) getByBlockHeight(height []byte, batch *pebble.Batch) ([]*mode
// try to decode single receipt (breaking change migration)
var storeReceipt models.StorageReceipt
if err = rlp.DecodeBytes(val, &storeReceipt); err != nil {
return nil, err
gethReceipt := gethTypes.Receipt{}
if err = rlp.DecodeBytes(val, &gethReceipt); err != nil {
return nil, err
}

storeReceipt = *models.NewStorageReceipt(&gethReceipt)
}

receipts = []*models.StorageReceipt{&storeReceipt}
Expand Down

0 comments on commit 56c5fcb

Please sign in to comment.