Skip to content

Commit

Permalink
correct feature gate use_default_units_in_fee_calculation usage
Browse files Browse the repository at this point in the history
  • Loading branch information
tao-stones committed Jun 12, 2023
1 parent 0645e96 commit 4dcd8fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion runtime/src/accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ impl Accounts {
ComputeBudget::new(compute_budget::MAX_COMPUTE_UNIT_LIMIT as u64);
let _process_transaction_result = compute_budget.process_instructions(
tx.message().program_instructions_iter(),
feature_set.is_active(&use_default_units_in_fee_calculation::id()),
true, // default_units_per_instruction has enabled in MNB
!feature_set.is_active(&remove_deprecated_request_unit_ix::id()),
true, // don't reject txs that use request heap size ix
feature_set.is_active(&add_set_tx_loaded_accounts_data_size_instruction::id()),
Expand Down
4 changes: 2 additions & 2 deletions runtime/src/cost_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use {
feature_set::{
add_set_tx_loaded_accounts_data_size_instruction,
include_loaded_accounts_data_size_in_fee_calculation,
remove_deprecated_request_unit_ix, use_default_units_in_fee_calculation, FeatureSet,
remove_deprecated_request_unit_ix, FeatureSet,
},
instruction::CompiledInstruction,
program_utils::limited_deserialize,
Expand Down Expand Up @@ -116,7 +116,7 @@ impl CostModel {
let enable_request_heap_frame_ix = true;
let result = compute_budget.process_instructions(
transaction.message().program_instructions_iter(),
feature_set.is_active(&use_default_units_in_fee_calculation::id()),
true, // default_units_per_instruction has enabled in MNB
!feature_set.is_active(&remove_deprecated_request_unit_ix::id()),
enable_request_heap_frame_ix,
feature_set.is_active(&add_set_tx_loaded_accounts_data_size_instruction::id()),
Expand Down

0 comments on commit 4dcd8fc

Please sign in to comment.