Make staking add_reward_points_to_validator public (#3273)

* make staking add_reward_points_to_validator public

* make storage private

* bump version
This commit is contained in:
thiolliere
2019-08-01 09:55:28 +02:00
committed by Gavin Wood
parent cb7383b6b6
commit b504f5a7bb
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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,
};
+2 -2
View File
@@ -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<T: Trait> Module<T> {
///
/// 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) {
<Module<T>>::current_elected().iter()
.position(|elected| *elected == validator)
.map(|index| {