Replace Overflow-Prone Operations in Staking with Saturating Arithmetic (#2115)

* Improve a few doc string

* Replace overflow-prone operation with saturating.

* Remove whitespace.

* Update wasm; Bump spec;

* Bump impl again.

* Fix review comments.
This commit is contained in:
Kian Peymani
2019-03-26 18:09:14 +04:30
committed by Gav Wood
parent 571d094313
commit da124d74d1
6 changed files with 158 additions and 49 deletions
+1 -1
View File
@@ -310,7 +310,7 @@ pub trait Currency<AccountId> {
value: Self::Balance,
) -> result::Result<(), &'static str>;
/// Deducts up to `value` from the combined balance of `who`, preferring to deduct from the
/// Deducts up to `value` from the combined balance of `who`, preferring to deduct from the
/// free balance. This function cannot fail.
///
/// The resulting imbalance is the first item of the tuple returned.