Don't inlucde nominaotrs that back no one in the snapshot. (#9017)

This commit is contained in:
Kian Paimani
2021-06-07 11:26:31 +02:00
committed by GitHub
parent f01c396677
commit d9c1836987
+4 -2
View File
@@ -2518,8 +2518,10 @@ impl<T: Config> Module<T> {
.map_or(true, |spans| submitted_in >= spans.last_nonzero_slash())
});
let vote_weight = weight_of(&nominator);
all_voters.push((nominator, vote_weight, targets))
if !targets.is_empty() {
let vote_weight = weight_of(&nominator);
all_voters.push((nominator, vote_weight, targets))
}
}
all_voters