mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 09:17:58 +00:00
make pool roles optional (#11411)
* make pool roles optional * undo lock file changes? * add migration * Fix * fix review comments
This commit is contained in:
@@ -533,10 +533,12 @@ impl<T: Config> StakingLedger<T> {
|
||||
/// case that either the active bonded or some unlocking chunks become dust after slashing.
|
||||
/// Returns the amount of funds actually slashed.
|
||||
///
|
||||
/// `slash_era` is the era in which the slash (which is being enacted now) actually happened.
|
||||
///
|
||||
/// # Note
|
||||
///
|
||||
/// This calls `Config::OnStakerSlash::on_slash` with information as to how the slash
|
||||
/// was applied.
|
||||
/// This calls `Config::OnStakerSlash::on_slash` with information as to how the slash was
|
||||
/// applied.
|
||||
fn slash(
|
||||
&mut self,
|
||||
slash_amount: BalanceOf<T>,
|
||||
@@ -615,6 +617,7 @@ impl<T: Config> StakingLedger<T> {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
self.unlocking.retain(|c| !c.value.is_zero());
|
||||
T::OnStakerSlash::on_slash(&self.stash, self.active, &slashed_unlocking);
|
||||
pre_slash_total.saturating_sub(self.total)
|
||||
|
||||
Reference in New Issue
Block a user