Skip to content

Commit

Permalink
update TotalValueLocked storage item in addition to BondedPools itself
Browse files Browse the repository at this point in the history
  • Loading branch information
4meta5 committed Feb 13, 2025
1 parent 9952cdd commit 5683899
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runtime/src/migrations/fix_pool_members.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use frame_support::{
traits::{fungible::Inspect, Get},
weights::Weight,
};
use pallet_nomination_pools::{BondedPools, PoolMembers};
use pallet_nomination_pools::{BondedPools, PoolMembers, TotalValueLocked};
use polkadot_sdk::*;
use sp_core::crypto::Ss58Codec;
use sp_runtime::{traits::Zero, AccountId32};
Expand Down Expand Up @@ -82,6 +82,7 @@ where
} else {
pool.points = Zero::zero();
}
TotalValueLocked::<T>::mutate(|x| *x -= *removed_stake);
}
});
weight += T::DbWeight::get().writes(1);
Expand Down

0 comments on commit 5683899

Please sign in to comment.