Skip to content
This repository was archived by the owner on May 22, 2023. It is now read-only.

Commit 8adcd8a

Browse files
kianenigmaAndrei Navoichyk
authored andcommitted
Don't inlucde nominaotrs that back no one in the snapshot. (paritytech#9017)
1 parent 1c553c0 commit 8adcd8a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

frame/staking/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2518,8 +2518,10 @@ impl<T: Config> Module<T> {
25182518
.map_or(true, |spans| submitted_in >= spans.last_nonzero_slash())
25192519
});
25202520

2521-
let vote_weight = weight_of(&nominator);
2522-
all_voters.push((nominator, vote_weight, targets))
2521+
if !targets.is_empty() {
2522+
let vote_weight = weight_of(&nominator);
2523+
all_voters.push((nominator, vote_weight, targets))
2524+
}
25232525
}
25242526

25252527
all_voters

0 commit comments

Comments
 (0)