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

Commit 0168dcb

Browse files
kianenigmashawntabrizi
authored andcommitted
Don't inlucde nominaotrs that back no one in the snapshot. (#9017)
1 parent 600c1f2 commit 0168dcb

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
@@ -2520,8 +2520,10 @@ impl<T: Config> Module<T> {
25202520
.map_or(true, |spans| submitted_in >= spans.last_nonzero_slash())
25212521
});
25222522

2523-
let vote_weight = weight_of(&nominator);
2524-
all_voters.push((nominator, vote_weight, targets))
2523+
if !targets.is_empty() {
2524+
let vote_weight = weight_of(&nominator);
2525+
all_voters.push((nominator, vote_weight, targets))
2526+
}
25252527
}
25262528

25272529
all_voters

0 commit comments

Comments
 (0)