-
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(chainspec): add Chainspec::blob_fee_params_at_timestamp #14049
feat(chainspec): add Chainspec::blob_fee_params_at_timestamp #14049
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.
ty,
smol suggestions
crates/chainspec/src/spec.rs
Outdated
@@ -385,7 +385,7 @@ impl ChainSpec { | |||
// given timestamp. | |||
for (fork, params) in bf_params.iter().rev() { | |||
if self.hardforks.is_fork_active_at_timestamp(fork.clone(), timestamp) { | |||
return *params | |||
return *params; |
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.
return *params; | |
return *params |
crates/chainspec/src/spec.rs
Outdated
@@ -404,7 +404,7 @@ impl ChainSpec { | |||
// given timestamp. | |||
for (fork, params) in bf_params.iter().rev() { | |||
if self.hardforks.is_fork_active_at_block(fork.clone(), block_number) { | |||
return *params | |||
return *params; |
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.
return *params; | |
return *params |
crates/chainspec/src/spec.rs
Outdated
if self.is_cancun_active_at_timestamp(timestamp) { | ||
Some(cancun) | ||
} else if self.is_prague_active_at_timestamp(timestamp) { | ||
Some(prague) |
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 flip the order here starting with the highest (prague)
crates/chainspec/src/spec.rs
Outdated
@@ -413,6 +413,18 @@ impl ChainSpec { | |||
} | |||
} | |||
|
|||
/// Get the blob fee parameters for the given timestamp. | |||
pub fn blob_fee_params_at_timestamp(&self, timestamp: u64) -> Option<BlobParams> { |
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 also make this part of the chainspec trait?
Closes #14042