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

This commit is contained in:
Nazar Mokrynskyi
2022-04-25 07:16:38 +03:00
committed by GitHub
parent 53575a959c
commit 539946911e
+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`.