-
Notifications
You must be signed in to change notification settings - Fork 283
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: Declared EthBlockBody
trait
#2085
base: main
Are you sure you want to change the base?
Feat: Declared EthBlockBody
trait
#2085
Conversation
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 is a good start,
will need to think about this a bit longer before I'll merge this
crates/consensus/src/block/traits.rs
Outdated
@@ -12,3 +12,21 @@ impl<T, H> EthBlock for Block<T, H> { | |||
self.body.withdrawals.as_ref() | |||
} | |||
} | |||
|
|||
/// A trait for Ethereum block body utilities. | |||
pub trait BlockBodyTrait { |
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.
can we name this EthBlockBody
perhaps?
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.
Sure!
c637434
to
5caf004
Compare
BlockBody
traitEthBlockBody
trait
Motivation
Fixes #2083
Solution
Added a
BlockBodyTrait
in crates/consensus/src/block/traits.rs and it's implementations and then imported it incrates/consensus/src/block/mod.rs
andcrates/consensus/src/lib.rs
I have not implemented the transaction associated type, after reading the comment in the issue page
All the tests pass
PR Checklist