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

eip4895: make Vec<Withdrawal> pub in Withdrawals #1590

Closed
wants to merge 2 commits into from

Conversation

tcoratger
Copy link
Contributor

@@ -57,32 +57,32 @@ impl Withdrawal {
)]
#[cfg_attr(any(test, feature = "arbitrary"), derive(arbitrary::Arbitrary))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Withdrawals(Vec<Withdrawal>);
pub struct Withdrawals(pub Vec<Withdrawal>);
Copy link
Member

Choose a reason for hiding this comment

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

I personally think this makes the API a bit confused, either we make this pub and remove the iter/into_inner or we continue as the API is today and add as_ref. there's no reason to have eg iter if this is pub as you can now just do withdrawals.0.iter()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree and I think that we can remove iter/into_inner, will make everything more generic with less functions. Let me know what you think and I can adapt

Copy link
Member

Choose a reason for hiding this comment

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

actually we already have AsRef for this (through derive), so I believe we can use it in reth and avoid any changes here?

@tcoratger tcoratger closed this Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants