fn new_session(actual_elapsed: T::Moment, should_reward: bool) {
		if should_reward {
			// accumulate good session reward
			let reward = Self::this_session_reward(actual_elapsed);
			<CurrentEraReward<T>>::mutate(|r| *r += reward);
		}

		let session_index = <session::Module<T>>::current_index();
		if <ForcingNewEra<T>>::take().is_some()
			|| ((session_index - Self::last_era_length_change()) % Self::sessions_per_era()).is_zero()
		{
			Self::new_era();
		}
	}
/// Session has just changed. We need to determine whether we pay a reward, slash and/or
/// move to a new era.
Session has just changed. We need to determine whether we pay a reward, slash and/or
move to a new era.
Session has just changed . We need to determine whether we pay a reward slash and / or move to a new era .
fn new_session(actual_elapsed: T::Moment, should_reward: bool) {
		if should_reward {
			// accumulate good session reward
			let reward = Self::this_session_reward(actual_elapsed);
			<CurrentEraReward<T>>::mutate(|r| *r += reward);
		}
		let session_index = <session::Module<T>>::current_index();
		if <ForcingNewEra<T>>::take().is_some()
			|| ((session_index - Self::last_era_length_change()) % Self::sessions_per_era()).is_zero()
		{
			Self::new_era();
		}
	}
fn new_session ( actual_elapsed : T :: Moment , should_reward : bool ) { if should_reward { // accumulate good session reward let reward = Self :: this_session_reward ( actual_elapsed ) ; < CurrentEraReward < T > > :: mutate ( | r | * r += reward ) ; } let session_index = < session :: Module < T > > :: current_index ( ) ; if < ForcingNewEra < T > > :: take ( ) . is_some ( ) || ( ( session_index - Self :: last_era_length_change ( ) ) % Self :: sessions_per_era ( ) ) . is_zero ( ) { Self :: new_era ( ) ; } }
Session has just changed.
Session has just changed .
actual_elapsed
T::Moment
should_reward
bool
actual_elapsed
T::Moment
should_reward
bool