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

Commit 1fa8cf7

Browse files
authored
Don't inlucde nominaotrs that back no one in the snapshot. (#9017)
1 parent 1085a90 commit 1fa8cf7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

frame/staking/src/lib.rs

+4-2
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)