Trait subsocial_runtime::OnUnbalanced [−][src]
Handler for when some currency “account” decreased in balance for some reason.
The only reason at present for an increase would be for validator rewards, but there may be other reasons in the future or for other chains.
Reasons for decreases include:
- Someone got slashed.
- Someone paid for a transaction to be included.
Provided methods
pub fn on_unbalanceds<B>(amounts: impl Iterator<Item = Imbalance>) where
Imbalance: Imbalance<B>,
[src]
Imbalance: Imbalance<B>,
Handler for some imbalances. The different imbalances might have different origins or meanings, dependent on the context. Will default to simply calling on_unbalanced for all of them. Infallible.
pub fn on_unbalanced(amount: Imbalance)
[src]
Handler for some imbalance. Infallible.
pub fn on_nonzero_unbalanced(amount: Imbalance)
[src]
Actually handle a non-zero imbalance. You probably want to implement this rather than
on_unbalanced
.
Implementations on Foreign Types
impl<Imbalance> OnUnbalanced<Imbalance> for () where
Imbalance: TryDrop,
[src]
Imbalance: TryDrop,
impl<Balance, I, Part1, Target1, Part2, Target2> OnUnbalanced<I> for SplitTwoWays<Balance, I, Part1, Target1, Part2, Target2> where
Balance: From<u32> + Div<Balance, Output = Balance> + Saturating,
I: Imbalance<Balance>,
Part1: Value,
Target1: OnUnbalanced<I>,
Part2: Value,
Target2: OnUnbalanced<I>,
[src]
Balance: From<u32> + Div<Balance, Output = Balance> + Saturating,
I: Imbalance<Balance>,
Part1: Value,
Target1: OnUnbalanced<I>,
Part2: Value,
Target2: OnUnbalanced<I>,
pub fn on_nonzero_unbalanced(amount: I)
[src]
impl<T> OnUnbalanced<<<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::NegativeImbalance> for Module<T> where
T: Trait,
[src]
T: Trait,
pub fn on_nonzero_unbalanced(
amount: <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::NegativeImbalance
)
[src]
amount: <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::NegativeImbalance
)
Implementors
impl OnUnbalanced<<Module<Runtime, DefaultInstance> as Currency<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId>>::NegativeImbalance> for DealWithFees
[src]
fn on_unbalanceds<B>(
fees_then_tips: impl Iterator<Item = <Balances as Currency<AccountId>>::NegativeImbalance>
)
[src]
fees_then_tips: impl Iterator<Item = <Balances as Currency<AccountId>>::NegativeImbalance>
)