Skip to content
Snippets Groups Projects
Commit 1d46a43a authored by Cédric Moreau's avatar Cédric Moreau
Browse files

wip: refact: mutate_pool_for_session

parent 65905fcc
Branches
No related tags found
No related merge requests found
......@@ -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<
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment