-
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
refactor: replace calculate_next_block_base_fee
with alloy's builtin function
#7641
refactor: replace calculate_next_block_base_fee
with alloy's builtin function
#7641
Conversation
crates/primitives/src/basefee.rs
Outdated
) | ||
} | ||
} | ||
calc_next_block_base_fee(gas_used as u128, gas_limit as u128, base_fee as u128, base_fee_params) as u64 |
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'd just re-export this and replace every call in the codebase with calc_next_block_base_fee
, or alternatively import the alloy_eips crate where this is called
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 thought of doing that but felt that changing the function name throughout the whole codebase wouldn't be okay for me to do. If there is no issue with my approach can the PR be merged?
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.
re-export would be preferred here, even if this means we need to about a few type casts etc
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.
re-export would be preferred here, even if this means we need to about a few type casts etc
working on it
calculate_next_block_base_fee
with alloy's builtin functioncalculate_next_block_base_fee
with alloy's builtin function
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'd prefer if we could entirely replace the function and use the re-exported alloy fn
this likely requires a few casts
crates/primitives/src/basefee.rs
Outdated
) | ||
} | ||
} | ||
calc_next_block_base_fee(gas_used as u128, gas_limit as u128, base_fee as u128, base_fee_params) as u64 |
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.
re-export would be preferred here, even if this means we need to about a few type casts etc
fixed in the latest commit |
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.
great, ty!
Fixes #7635 by replacing
calculate_next_block_base_fee
fromreth/crates/primitives/src/basefee.rs
Line 26 in d4ea415