-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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(sdk): SealedHeader
generic over header
#11429
Conversation
not sure how to fix this test. necessary to get this merged in order to add the primitive traits module to the library, and import into |
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.
q for @joshieDo otherwise lgtm
use serde::{Deserialize, Serialize}; | ||
|
||
/// A [`Header`] that is sealed at a precalculated hash, use [`SealedHeader::unseal()`] if you want | ||
/// to modify header. | ||
#[derive(Debug, Clone, PartialEq, Eq, Hash, AsRef, Deref, Serialize, Deserialize)] | ||
#[add_arbitrary_tests(rlp)] | ||
pub struct SealedHeader { | ||
pub struct SealedHeader<H = Header> { |
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.
I think that's reasonable, although for header op and eth use the same type
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.
we shouldn't only limit this to op
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.
makes sense
Makes
SealedHeader
type definition generic over header type, which is a necessary first step to useSealedHeader
inBlock
trait methods