Skip to content

Commit

Permalink
cosmetic: run rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianFranzen committed Feb 18, 2025
1 parent d4dca0d commit ea8bd21
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions runtime/src/migrations/fix_pool_members.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
use polkadot_sdk::*;

use frame_support::{
ensure,
traits::{fungible::Inspect, Get},
weights::Weight, ensure,
};
use pallet_nomination_pools::{
BondedPools, PoolMembers,
weights::Weight,
};
use pallet_nomination_pools::{BondedPools, PoolMembers};
use sp_core::crypto::Ss58Codec;
use sp_runtime::traits::Zero;
use sp_runtime::AccountId32;
Expand Down Expand Up @@ -43,10 +42,11 @@ where

for account in CORRUPTED_POOL_MEMBERS {
// Attempt to parse address
let account: T::AccountId = AccountId32::from_ss58check(account).map_err(|_|"Failed to parse address")?.into();
let account: T::AccountId = AccountId32::from_ss58check(account)
.map_err(|_| "Failed to parse address")?
.into();

if let Some(member) = PoolMembers::<T>::take(&account) {

// Track weight of pool members update
weight += T::DbWeight::get().reads_writes(1, 1);

Expand Down Expand Up @@ -75,7 +75,10 @@ where
}
}

ensure!(total_balance_members::<T>() == balance_before, "Total member balance was changed.");
ensure!(
total_balance_members::<T>() == balance_before,
"Total member balance was changed."
);

Ok::<(), &str>(())
}) {
Expand Down

0 comments on commit ea8bd21

Please sign in to comment.