Skip to content

Commit

Permalink
Rename 'cumulative_percentage()' to 'cumulative_percentage_change()'
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-ch committed Sep 18, 2024
1 parent 3db5157 commit adffd99
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crates/fuel-gas-price-algorithm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub mod v0;
pub mod v1;

#[allow(clippy::cast_possible_truncation)]
pub(crate) fn cumulative_percentage(
pub(crate) fn cumulative_percentage_change(
new_exec_price: u64,
for_height: u32,
percentage: u64,
Expand Down
4 changes: 2 additions & 2 deletions crates/fuel-gas-price-algorithm/src/v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{
num::NonZeroU64,
};

use crate::cumulative_percentage;
use crate::cumulative_percentage_change;

#[cfg(test)]
mod tests;
Expand All @@ -30,7 +30,7 @@ impl AlgorithmV0 {
}

pub fn worst_case(&self, height: u32) -> u64 {
cumulative_percentage(
cumulative_percentage_change(
self.new_exec_price,
self.for_height,
self.percentage,
Expand Down
6 changes: 3 additions & 3 deletions crates/fuel-gas-price-algorithm/src/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{
ops::Div,
};

use crate::cumulative_percentage;
use crate::cumulative_percentage_change;

#[cfg(test)]
mod tests;
Expand Down Expand Up @@ -41,13 +41,13 @@ impl AlgorithmV1 {
}

pub fn worst_case(&self, height: u32) -> u64 {
let exec = cumulative_percentage(
let exec = cumulative_percentage_change(
self.new_exec_price,
self.for_height,
self.exec_price_percentage,
height,
);
let da = cumulative_percentage(
let da = cumulative_percentage_change(
self.new_da_gas_price,
self.for_height,
self.da_gas_price_percentage,
Expand Down

0 comments on commit adffd99

Please sign in to comment.