-
Notifications
You must be signed in to change notification settings - Fork 249
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
feat: reth's block body fns #1775
Conversation
I just brought these fns at the moment since the rest explicitly use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, makes sense
one suggestion
/// Returns true if the transaction is an EIP-4844 transaction. | ||
#[inline] | ||
fn is_eip4844(&self) -> bool { | ||
self.ty() == EIP4844_TX_TYPE_ID | ||
} | ||
|
||
/// Returns true if the transaction is an EIP-7702 transaction. | ||
#[inline] | ||
fn is_eip7702(&self) -> bool { | ||
self.ty() == EIP7702_TX_TYPE_ID | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are no longer necessary with #1773
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits
crates/consensus/src/block/mod.rs
Outdated
/// Helper for blob_transactions_iter function | ||
#[inline] | ||
fn is_eip4844(tx: &T) -> bool { | ||
tx.is_eip4844() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this function is not needed and can be removed
crates/consensus/src/block/mod.rs
Outdated
/// Returns only the blob transactions, if any, from the block body. | ||
#[inline] | ||
pub fn blob_transactions(&self) -> Vec<&T> { | ||
self.blob_transactions_iter().collect() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be an impl Iterator instead because this is mostly useful when iterating over blob txs
41d400e
to
9147cbc
Compare
Motivation
paradigmxyz/reth#12519
Solution
Brought BlockBody fns from reth to replace reth's BlockBody type with alloy's
PR Checklist