alloy-rs / alloy

Transports, Middleware, and Networks for the Alloy project
https://alloy.rs
Apache License 2.0
668 stars 243 forks source link

fix: pass slice to RlpReceipt::rlp_decode_fields #1696

Closed klkvr closed 3 days ago

klkvr commented 3 days ago

Motivation

For OP we need to know the length of available payload to correctly handle optional fields on receipt. This PR changes the RlpReceipt trait so that fields decoding method accepts a slice of the same length as specified in header and can use it to determine where to stop decoding

PR Checklist