diff --git a/frame/staking/src/lib.rs b/frame/staking/src/lib.rs index 58ab459d1bf28..734afb0824615 100644 --- a/frame/staking/src/lib.rs +++ b/frame/staking/src/lib.rs @@ -2821,7 +2821,8 @@ impl frame_election_provider_support::ElectionDataProvider frame_election_provider_support::ElectionDataProvider::get() { Forcing::ForceNone => Bounded::max_value(), Forcing::ForceNew | Forcing::ForceAlways => Zero::zero(), - Forcing::NotForcing if era_length >= T::SessionsPerEra::get() => Zero::zero(), + Forcing::NotForcing if era_progress >= T::SessionsPerEra::get() => Zero::zero(), Forcing::NotForcing => T::SessionsPerEra::get() - .saturating_sub(era_length) + .saturating_sub(era_progress) // One session is computed in this_session_end. .saturating_sub(1) .into(),