-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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(primitives): effective_gas_tip and effective_tip_per_gas functions together #5144
Conversation
Codecov Report
... and 449 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
ptal @Rjected |
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.
Good start, just have some small changes so far
let base_fee = base_fee as u128; | ||
pub fn effective_tip_per_gas(&self, base_fee: Option<u64>) -> Option<u128> { | ||
// Convert the base fee to u128 if present, or provide a default value | ||
let base_fee = base_fee.map_or(0, |fee| fee as u128); |
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.
Should use unwrap_or_default
here
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.
Should use
unwrap_or_default
here
Hello, thank you for these information. Deleted comments + used unwrap_or_default :)
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.
just one change that should have been caught earlier, then this looks good
Hey, thank you for this. I changed the missing part :) |
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.
smol style nit
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.
this looks good to me now
…ns together (#5144) Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Should close this #5141