pub fn reward_by_ids(
        validators_points: impl IntoIterator<Item = (T::AccountId, u32)>
    ) {
        if let Some(active_era) = Self::active_era() {
            <ErasRewardPoints<T>>::mutate(active_era.index, |era_rewards| {
                for (validator, points) in validators_points.into_iter() {
                    *era_rewards.individual.entry(validator).or_default() += points;
                    era_rewards.total += points;
                }
            });
        }
    }
/// Add reward points to validators using their stash account ID.
///
/// Validators are keyed by stash account ID and must be in the current elected set.
///
/// For each element in the iterator the given number of points in u32 is added to the
/// validator, thus duplicates are handled.
///
/// At the end of the era each the total payout will be distributed among validator
/// relatively to their points.
///
/// COMPLEXITY: Complexity is `number_of_validator_to_reward x current_elected_len`.
/// If you need to reward lots of validator consider using `reward_by_indices`.
Add reward points to validators using their stash account ID.
Validators are keyed by stash account ID and must be in the current elected set.

For each element in the iterator the given number of points in u32 is added to the
validator, thus duplicates are handled.

At the end of the era each the total payout will be distributed among validator
relatively to their points.


Add reward points to validators using their stash account ID . Validators are keyed by stash account ID and must be in the current elected set . For each element in the iterator the given number of points in u32 is added to the validator thus duplicates are handled . At the end of the era each the total payout will be distributed among validator relatively to their points .
pub fn reward_by_ids(
        validators_points: impl IntoIterator<Item = (T::AccountId, u32)>
    ) {
        if let Some(active_era) = Self::active_era() {
            <ErasRewardPoints<T>>::mutate(active_era.index, |era_rewards| {
                for (validator, points) in validators_points.into_iter() {
                    *era_rewards.individual.entry(validator).or_default() += points;
                    era_rewards.total += points;
                }
            });
        }
    }
pub fn reward_by_ids ( validators_points : impl IntoIterator < Item = ( T :: AccountId , u32 ) > ) { if let Some ( active_era ) = Self :: active_era ( ) { < ErasRewardPoints < T > > :: mutate ( active_era . index , | era_rewards | { for ( validator , points ) in validators_points . into_iter ( ) { * era_rewards . individual . entry ( validator ) . or_default ( ) += points ; era_rewards . total += points ; } } ) ; } }
Add reward points to validators using their stash account ID.
Add reward points to validators using their stash account ID .
validators_points
impl IntoIterator<Item = (T::AccountId, u32)>