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

Don't include nominators that back no one in the snapshot. #9017

Merged
1 commit merged into from
Jun 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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