-
Notifications
You must be signed in to change notification settings - Fork 4.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
Remove dead code that still fetches lamports-per-signature from nonce or from blockhash_queue #34943
Remove dead code that still fetches lamports-per-signature from nonce or from blockhash_queue #34943
Conversation
446abbd
to
fa585b3
Compare
…t_fee_for_message_with_lamports_per_signature() as it is redandent.
fa585b3
to
6241072
Compare
@@ -80,7 +80,6 @@ impl FeeStructure { | |||
pub fn calculate_fee( | |||
&self, | |||
message: &SanitizedMessage, | |||
_lamports_per_signature: 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.
The rest of changes are results of removing this unused parameter.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #34943 +/- ##
=========================================
- Coverage 81.6% 81.6% -0.1%
=========================================
Files 828 830 +2
Lines 224339 224681 +342
=========================================
+ Hits 183274 183432 +158
- Misses 41065 41249 +184 |
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.
Looks good to me.. I was concerned about some potential consensus breaking changes here in all the nonce handling but it looks like check_transaction_age
-> check_transaction_for_nonce
already filters out any transactions that use invalid nonces properly. cc @t-nelson for a second look if he wishes
Close this without merge; we decided to keep original |
Problem
calculate_fee()
function no longer useslamports_per_signature
parameter, yet there are code still fetches it from nonce account, or lock and read from blockhash_queue. Can gain some perf if these dead code are removed.Summary of Changes
Fixes #34864