Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: introduce receipts generic #13276

Merged
merged 2 commits into from
Dec 11, 2024
Merged

chore: introduce receipts generic #13276

merged 2 commits into from
Dec 11, 2024

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Dec 10, 2024

on networkprimitives we likely need to enforce

type Receipt: Encodable

EncodeableReceipt instead so that we have Encodable2718 for ReceiptWithBloom<T>

@mattsse mattsse added the A-sdk Related to reth's use as a library label Dec 10, 2024
Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just one question

impl<T: RlpDecodableReceipt> alloy_rlp::Decodable for Receipts<T> {
#[inline]
fn decode(buf: &mut &[u8]) -> alloy_rlp::Result<Self> {
alloy_rlp::Decodable::decode(buf).map(Self)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the map(Self) for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this decodes the inner Vec type and the map(Self) wraps that into Receipts()

@mattsse mattsse added this pull request to the merge queue Dec 11, 2024
Merged via the queue into main with commit 9be5a78 Dec 11, 2024
42 checks passed
@mattsse mattsse deleted the matt/add-receipts-t branch December 11, 2024 07:26
lean-apple pushed a commit to lean-apple/reth that referenced this pull request Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sdk Related to reth's use as a library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants