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

Commit

Permalink
Don't inlucde nominaotrs that back no one in the snapshot. (paritytec…
Browse files Browse the repository at this point in the history
  • Loading branch information
kianenigma authored and Andrei Navoichyk committed Sep 9, 2022
1 parent 1c553c0 commit 8adcd8a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frame/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8adcd8a

Please sign in to comment.