mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 02:48:03 +00:00
keep nominations after getting kicked with zero slash (#4681)
* keep nominations after getting kicked with zero slash * rename next_key to maybe_next_key Co-Authored-By: Gavin Wood <gavin@parity.io> Co-authored-by: Gavin Wood <github@gavwood.com>
This commit is contained in:
committed by
GitHub
parent
4e0ac574e2
commit
3ae5e1640b
@@ -1482,11 +1482,11 @@ impl<T: Trait> Module<T> {
|
||||
let Nominations { submitted_in, mut targets, suppressed: _ } = nominations;
|
||||
|
||||
// Filter out nomination targets which were nominated before the most recent
|
||||
// slashing span.
|
||||
// non-zero slash.
|
||||
targets.retain(|stash| {
|
||||
<Self as Store>::SlashingSpans::get(&stash).map_or(
|
||||
true,
|
||||
|spans| submitted_in >= spans.last_start(),
|
||||
|spans| submitted_in >= spans.last_nonzero_slash(),
|
||||
)
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user