Skip to content
Snippets Groups Projects
Commit b504f5a7 authored by thiolliere's avatar thiolliere Committed by Gavin Wood
Browse files

Make staking add_reward_points_to_validator public (#3273)

* make staking add_reward_points_to_validator public

* make storage private

* bump version
parent cb7383b6
Branches
No related merge requests found
......@@ -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,
};
......
......@@ -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| {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment