File tree 1 file changed +2
-10
lines changed
substrate/frame/staking/src
1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -1139,11 +1139,7 @@ pub type Existence = ();
1139
1139
pub struct ExistenceOf < T > ( core:: marker:: PhantomData < T > ) ;
1140
1140
impl < T : Config > Convert < T :: AccountId , Option < Existence > > for ExistenceOf < T > {
1141
1141
fn convert ( validator : T :: AccountId ) -> Option < Existence > {
1142
- ActiveEra :: < T > :: get ( )
1143
- . filter ( |active_era| {
1144
- ErasStakersOverview :: < T > :: contains_key ( active_era. index , & validator)
1145
- } )
1146
- . map ( |_| ( ) )
1142
+ Validators :: < T > :: contains_key ( & validator) . then_some ( ( ) )
1147
1143
}
1148
1144
}
1149
1145
@@ -1168,11 +1164,7 @@ impl<T: Config> Convert<T::AccountId, Option<ExistenceOrLegacyExposure<T::Accoun
1168
1164
fn convert (
1169
1165
validator : T :: AccountId ,
1170
1166
) -> Option < ExistenceOrLegacyExposure < T :: AccountId , BalanceOf < T > > > {
1171
- ActiveEra :: < T > :: get ( )
1172
- . filter ( |active_era| {
1173
- ErasStakersOverview :: < T > :: contains_key ( active_era. index , & validator)
1174
- } )
1175
- . map ( |_| ExistenceOrLegacyExposure :: Exists )
1167
+ Validators :: < T > :: contains_key ( & validator) . then_some ( ExistenceOrLegacyExposure :: Exists )
1176
1168
}
1177
1169
}
1178
1170
You can’t perform that action at this time.
0 commit comments