diff --git a/pallets/distance/src/lib.rs b/pallets/distance/src/lib.rs index ae755b7c86bb6ce17d4871af181251f7e8dccab7..565c86ad584932460dbf16d9ee709a49a10626db 100644 --- a/pallets/distance/src/lib.rs +++ b/pallets/distance/src/lib.rs @@ -239,7 +239,7 @@ pub mod pallet { Error::<T, I>::ManyEvaluationsInBlock, ); - Pallet::<T, I>::mutate_current_pool( + Pallet::<T, I>::mutate_pool_for_session( pallet_session::CurrentIndex::<T>::get().wrapping_add(1), |result_pool| { ensure!( @@ -279,7 +279,7 @@ pub mod pallet { who: T::AccountId, idty_index: <T as pallet_certification::Config<I>>::IdtyIndex, ) -> Result<(), DispatchError> { - Pallet::<T, I>::mutate_current_pool( + Pallet::<T, I>::mutate_pool_for_session( pallet_session::CurrentIndex::<T>::get(), |current_pool| { ensure!( @@ -305,7 +305,7 @@ pub mod pallet { impl<T: Config<I>, I: 'static> Pallet<T, I> { /// Mutate the evaluation pool containing the results to be applied on this session. - fn mutate_current_pool< + fn mutate_pool_for_session< R, F: FnOnce( &mut EvaluationPool<