More efficient identity and multiplier weight to fee (#11226)

This commit is contained in:
Nazar Mokrynskyi authored and GitHub committed 2022-04-25 04:16:38 +00:00
1 parent 53575a959c
commit 539946911e
1 file changed
+8
+8
View File
@@ -710,6 +710,10 @@ where
degree: 1,
})
}
fn calc(weight: &Weight) -> Self::Balance {
Self::Balance::saturated_from(*weight)
}
}
/// Implementor of [`WeightToFeePolynomial`] that uses a constant multiplier.
@@ -738,6 +742,10 @@ where
degree: 1,
})
}
fn calc(weight: &Weight) -> Self::Balance {
Self::Balance::saturated_from(*weight).saturating_mul(M::get())
}
}
/// A struct holding value for each `DispatchClass`.