Skip to content

Fix documentation for slashing #740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions traits/src/currency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ pub trait MultiCurrency<AccountId> {

/// Deduct the balance of `who` by up to `amount`.
///
/// As much funds up to `amount` will be deducted as possible. If this is
/// less than `amount`,then a non-zero value will be returned.
/// As much funds up to `amount` will be deducted as possible. If this is
/// less than `amount`, then a non-zero excess value will be returned.
fn slash(currency_id: Self::CurrencyId, who: &AccountId, amount: Self::Balance) -> Self::Balance;
}

Expand Down Expand Up @@ -153,7 +153,7 @@ pub trait MultiReservableCurrency<AccountId>: MultiCurrency<AccountId> {
/// cannot fail.
///
/// As much funds up to `value` will be deducted as possible. If the reserve
/// balance of `who` is less than `value`, then a non-zero second item will
/// balance of `who` is less than `value`, then a non-zero excess will
/// be returned.
fn slash_reserved(currency_id: Self::CurrencyId, who: &AccountId, value: Self::Balance) -> Self::Balance;

Expand Down Expand Up @@ -212,7 +212,7 @@ pub trait NamedMultiReservableCurrency<AccountId>: MultiReservableCurrency<Accou
/// cannot fail.
///
/// As much funds up to `value` will be deducted as possible. If the reserve
/// balance of `who` is less than `value`, then a non-zero second item will
/// balance of `who` is less than `value`, then a non-zero excess will
/// be returned.
fn slash_reserved_named(
id: &Self::ReserveIdentifier,
Expand Down Expand Up @@ -403,7 +403,7 @@ pub trait BasicCurrency<AccountId> {
/// Deduct the balance of `who` by up to `amount`.
///
/// As much funds up to `amount` will be deducted as possible. If this is
/// less than `amount`,then a non-zero value will be returned.
/// less than `amount`, then a non-zero excess value will be returned.
fn slash(who: &AccountId, amount: Self::Balance) -> Self::Balance;
}

Expand Down Expand Up @@ -465,7 +465,7 @@ pub trait BasicReservableCurrency<AccountId>: BasicCurrency<AccountId> {
/// cannot fail.
///
/// As much funds up to `value` will be deducted as possible. If the reserve
/// balance of `who` is less than `value`, then a non-zero second item will
/// balance of `who` is less than `value`, then a non-zero excess will
/// be returned.
fn slash_reserved(who: &AccountId, value: Self::Balance) -> Self::Balance;

Expand Down