-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 NetworkConfigBuilder
independent of concrete ChainSpec
#11176
Conversation
96860e9
to
3847e43
Compare
10b1da8
to
f89cefd
Compare
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, pedantic style nit
@@ -75,9 +75,9 @@ impl Status { | |||
/// | |||
/// Sets the `chain` and `genesis`, `blockhash`, and `forkid` fields based on the [`ChainSpec`] | |||
/// and head. | |||
pub fn spec_builder(spec: &ChainSpec, head: &Head) -> StatusBuilder { | |||
pub fn spec_builder(spec: impl EthChainSpec + Hardforks, head: &Head) -> StatusBuilder { |
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.
style nit, can we convert this to a where clause
#[non_exhaustive] | ||
pub struct NoopBlockReader; | ||
pub struct NoopBlockReader<ChainSpec> { |
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 need a generic on this anyway so this is okay
This PR extends
Hardforks
trait with helper methods to obtainfork_id
used by networking types.NetworkConfigBuilder
is changed to accept chainspec intobuild
method