Skip to content

Commit

Permalink
Fix warning dead_code
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed Feb 13, 2024
1 parent fdec1b0 commit 386f5a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions substrate/frame/nomination-pools/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ pub(crate) mod v7 {
Pallet::<T>::create_bonded_account(self.id)
}

#[allow(dead_code)]
fn points_to_balance(&self, points: BalanceOf<T>) -> BalanceOf<T> {
let bonded_balance =
T::Staking::active_stake(&self.bonded_account()).unwrap_or(Zero::zero());
Expand Down Expand Up @@ -243,6 +244,7 @@ pub(crate) mod v7 {
}

impl<T: Config> UnbondPool<T> {
#[allow(dead_code)]
fn point_to_balance(&self, points: BalanceOf<T>) -> BalanceOf<T> {
point_to_balance::<T>(self.balance, self.points, points)
}
Expand All @@ -265,6 +267,7 @@ pub(crate) mod v7 {
pub type SubPoolsStorage<T: Config> =
CountedStorageMap<Pallet<T>, Twox64Concat, PoolId, SubPools<T>>;

#[allow(dead_code)]
fn total_balance<T: Config>(self_as_member: &PoolMember<T>) -> BalanceOf<T> {
// let pool = V7BondedPool::<T>::get(self_as_member.pool_id).unwrap();
let id = self_as_member.pool_id;
Expand Down Expand Up @@ -292,6 +295,7 @@ pub(crate) mod v7 {
active_balance + unbonding_balance
}

#[allow(dead_code)]
fn point_to_balance<T: Config>(
current_balance: BalanceOf<T>,
current_points: BalanceOf<T>,
Expand Down

0 comments on commit 386f5a6

Please sign in to comment.