-
Notifications
You must be signed in to change notification settings - Fork 265
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: make block struct generic over header type #1179
Conversation
hey @emhane, do you know why the CI is failing? |
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.
need to make sure that all the implementations for Block
will also work for the non-default type. may advice is to add default generics last, after you got everything compiling.
@emhane , I ran all tests and I awaited by compiling. I don't got any error. |
sorry wasn't clear enough: remove the default for the generic. that's how I usually do.
|
Hmm. Looks a good start. |
@emhane, maybe |
block response does have generic header + transaction in form of associated types alloy/crates/network-primitives/src/traits.rs Lines 71 to 74 in dbd9d77
|
@emhane wdyt about switching generics order? it would turn this update into a non-breaking change and also seems more convenient as imo users are most likely to change the tx generic |
This PR allows Header to assume a type based on generic.
Closes #1177