impl Mul + saturating_mul by converting in u64 (#1610)

This commit is contained in:
thiolliere
2019-01-29 13:36:34 +01:00
committed by Gav Wood
parent a541ee8c05
commit ecffe0c371
3 changed files with 30 additions and 18 deletions
+2 -2
View File
@@ -201,7 +201,7 @@ impl<T: Trait> Module<T> {
/// The needed bond for a proposal whose spend is `value`.
fn calculate_bond(value: T::Balance) -> T::Balance {
Self::proposal_bond_minimum().max(Self::proposal_bond().times(value))
Self::proposal_bond_minimum().max(Self::proposal_bond() * value)
}
// Spend some money!
@@ -238,7 +238,7 @@ impl<T: Trait> Module<T> {
if !missed_any {
// burn some proportion of the remaining budget if we run a surplus.
let burn = Self::burn().times(budget_remaining).min(budget_remaining);
let burn = (Self::burn() * budget_remaining).min(budget_remaining);
budget_remaining -= burn;
Self::deposit_event(RawEvent::Burnt(burn))
}