From 4dcd8fc920c17d8ad28ff3877a94a112af293cb7 Mon Sep 17 00:00:00 2001 From: Tao Zhu Date: Mon, 12 Jun 2023 16:23:07 +0000 Subject: [PATCH] correct feature gate use_default_units_in_fee_calculation usage --- runtime/src/accounts.rs | 2 +- runtime/src/cost_model.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/src/accounts.rs b/runtime/src/accounts.rs index 304af92af6488e..d12f5405ad2c19 100644 --- a/runtime/src/accounts.rs +++ b/runtime/src/accounts.rs @@ -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()), diff --git a/runtime/src/cost_model.rs b/runtime/src/cost_model.rs index 005f9a57a7d20b..1ab8b80dc016ce 100644 --- a/runtime/src/cost_model.rs +++ b/runtime/src/cost_model.rs @@ -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, @@ -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()),