From b504f5a7bb1cc35b9c9971a946aa9ab594245786 Mon Sep 17 00:00:00 2001 From: thiolliere Date: Thu, 1 Aug 2019 09:55:28 +0200 Subject: [PATCH] Make staking add_reward_points_to_validator public (#3273) * make staking add_reward_points_to_validator public * make storage private * bump version --- substrate/node/runtime/src/lib.rs | 2 +- substrate/srml/staking/src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/substrate/node/runtime/src/lib.rs b/substrate/node/runtime/src/lib.rs index a8957e9016..d178eeff18 100644 --- a/substrate/node/runtime/src/lib.rs +++ b/substrate/node/runtime/src/lib.rs @@ -80,7 +80,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // implementation changes and behavior does not, then leave spec_version as // is and increment impl_version. spec_version: 125, - impl_version: 125, + impl_version: 126, apis: RUNTIME_API_VERSIONS, }; diff --git a/substrate/srml/staking/src/lib.rs b/substrate/srml/staking/src/lib.rs index ade395ec1c..fa9a297f7a 100644 --- a/substrate/srml/staking/src/lib.rs +++ b/substrate/srml/staking/src/lib.rs @@ -594,7 +594,7 @@ decl_storage! { pub CurrentEraStartSessionIndex get(current_era_start_session_index): SessionIndex; /// Rewards for the current era. Using indices of current elected set. - pub CurrentEraRewards: EraRewards; + CurrentEraRewards get(current_era_reward): EraRewards; /// The amount of balance actively at stake for each validator slot, currently. /// @@ -1403,7 +1403,7 @@ impl Module { /// /// At the end of the era each the total payout will be distributed among validator /// relatively to their points. - fn add_reward_points_to_validator(validator: T::AccountId, points: u32) { + pub fn add_reward_points_to_validator(validator: T::AccountId, points: u32) { >::current_elected().iter() .position(|elected| *elected == validator) .map(|index| {