Function bridge_hub_test_utils::check_sane_fees_values
source · pub fn check_sane_fees_values(
const_name: &str,
actual: u128,
calculate_estimated_fee: fn() -> u128,
overestimate_in_percent: Perbill,
margin_overestimate_diff_in_percent_for_lowering: Option<i16>,
label: &str,
)
Expand description
A helper function for comparing the actual value of a fee constant with its estimated value. The
estimated value can be overestimated (overestimate_in_percent
), and if the difference to the
actual value is below margin_overestimate_diff_in_percent_for_lowering
, we should lower the
actual value.