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

consensus: replace to by kind in Transaction trait #1484

Merged
merged 4 commits into from
Oct 15, 2024

Conversation

tcoratger
Copy link
Contributor

to naming convention can be confusing because we already have a to function in most implementations and this to function designates the receiving address while here we are going to get the kind of the transaction.

For example here it could be really confusing with potential double to().to() to catch the final address:

https://github.com/paradigmxyz/reth/blob/c4d7b591834055bdf3afed96b696e0a2cef0f383/crates/primitives/src/transaction/mod.rs#L226-L247

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

I was about to open an issue for exactly this

crates/consensus/src/transaction/eip1559.rs Show resolved Hide resolved
@mattsse mattsse merged commit cf7a950 into alloy-rs:main Oct 15, 2024
26 checks passed
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.

2 participants