Skip to content
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

correct feature gate use_default_units_in_fee_calculation usage #32077

Conversation

tao-stones
Copy link
Contributor

Problem

Noticed the misusage of feature gate use_default_units_in_fee_calculation when working on another issue. This feature gate (#26785) was introduced to fix a hard-coded bug in bank::calculate_fee(), should only be used when calling calculate_fee().

default_units_per_instruction was enabled in mnb in epoch 327, all calls to ComputeBudget::process_instructions() should pass true to this parameter.

The misusage corrected in this PR most likely resulting from copy/paste. Correcting should not have functional impact.

Summary of Changes

  • use true for default_units_per_instruction instead of using wrong feature gate status.

Fixes #

@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Merging #32077 (4dcd8fc) into master (0645e96) will decrease coverage by 0.1%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master   #32077     +/-   ##
=========================================
- Coverage    81.9%    81.9%   -0.1%     
=========================================
  Files         765      765             
  Lines      208477   208475      -2     
=========================================
- Hits       170895   170861     -34     
- Misses      37582    37614     +32     

Copy link
Contributor

@apfitzge apfitzge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes looks good to me. Bug was introduced in #30506, thanks for catching this quickly!

@tao-stones tao-stones merged commit 9b2c9b8 into solana-labs:master Jun 12, 2023
@tao-stones tao-stones deleted the misused-feature-gate-use_default_units_in_fee_calculation branch June 12, 2023 21:29
@tao-stones
Copy link
Contributor Author

Changes looks good to me. Bug was introduced in #30506, thanks for catching this quickly!

I wonder if it was introduced much earlier, probably here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants