diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 599205ece..aaf0d5f86 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -120,7 +120,9 @@ impl Convert for GasToWeight { pub struct WeightToGas; impl Convert for WeightToGas { fn convert(weight: Weight) -> u64 { - weight.saturating_div(gas_to_weight_ratio::RATIO) + weight + .checked_div(gas_to_weight_ratio::RATIO) + .expect("Compile-time constant is not zero; qed;") } }