Function sp_npos_elections::to_support_map[][src]

pub fn to_support_map<AccountId: IdentifierT>(
    winners: &[AccountId],
    assignments: &[StakedAssignment<AccountId>]
) -> Result<SupportMap<AccountId>, Error>
Expand description

Build the support map from the winners and assignments.

The list of winners is basically a redundancy for error checking only; It ensures that all the targets pointed to by the Assignment are present in the winners.