Skip to content

Commit

Permalink
fix errors in fee
Browse files Browse the repository at this point in the history
  • Loading branch information
nibty committed Dec 21, 2024
1 parent 2baee22 commit cf2f162
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sdk/src/fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use {
crate::{
compute_budget::{self, ComputeBudgetInstruction},
feature_set::{
self, full_inflation, include_loaded_accounts_data_size_in_fee_calculation,
full_inflation, include_loaded_accounts_data_size_in_fee_calculation,
reduce_stake_warmup_cooldown, FEATURE_NAMES, FULL_INFLATION_FEATURE_PAIRS,
},
native_token::sol_to_lamports,
Expand Down Expand Up @@ -549,7 +549,7 @@ impl FeeStructure {
// get_signature_cost_from_message(&mut tx_cost, &message);
// get_write_lock_cost(&mut tx_cost, message, &FeatureSet::default());
get_transaction_cost(&mut tx_cost, message, &FeatureSet::default());
get_compute_unit_price_from_message(&mut tx_cost, &message);
get_compute_unit_price_from_message(&mut tx_cost, message);

let derived_cu = tx_cost
.builtins_execution_cost
Expand All @@ -566,7 +566,7 @@ impl FeeStructure {
.saturating_mul(10) // ensures multiplication doesn't overflow
.saturating_add(
derived_cu
.saturating_mul(adjusted_compute_unit_price as u64)
.saturating_mul(adjusted_compute_unit_price)
.saturating_div(1_000_000),
); // change to 1_000_000 to convert to micro lamports

Expand Down

0 comments on commit cf2f162

Please sign in to comment.