Skip to content

Commit

Permalink
fixing review related to points
Browse files Browse the repository at this point in the history
  • Loading branch information
hackfisher committed Nov 18, 2019
1 parent 13e7b0c commit fe0283a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions srml/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub struct EraPoints {
impl EraPoints {
/// Add the reward to the validator at the given index. Index must be valid
/// (i.e. `index < current_elected.len()`).
fn add_points_to_index(&mut self, index: u32, points: u32) {
fn add_points_to_index(&mut self, index: u32, points: Points) {
if let Some(new_total) = self.total.checked_add(points) {
self.total = new_total;
self.individual
Expand Down Expand Up @@ -1423,7 +1423,7 @@ impl<T: Trait> Module<T> {
<Nominators<T>>::remove(stash);
}

pub fn reward_by_ids(validators_points: impl IntoIterator<Item = (T::AccountId, u32)>) {
pub fn reward_by_ids(validators_points: impl IntoIterator<Item = (T::AccountId, Points)>) {
CurrentEraPointsEarned::mutate(|rewards| {
let current_elected = <Module<T>>::current_elected();
for (validator, points) in validators_points.into_iter() {
Expand Down

0 comments on commit fe0283a

Please sign in to comment.