diff --git a/pallets/subtensor/src/lib.rs b/pallets/subtensor/src/lib.rs index 1cc522708..c895a7e1d 100644 --- a/pallets/subtensor/src/lib.rs +++ b/pallets/subtensor/src/lib.rs @@ -975,7 +975,7 @@ pub mod pallet { #[pallet::storage] // --- DMAP ( netuid ) --> subnet_name | Returns the name of the subnet. pub type SubnetName = StorageMap<_, Identity, u16, Vec, ValueQuery, DefaultUnicodeVecU8>; - + /// ============================ /// ==== Global Parameters ===== /// ============================ diff --git a/pallets/subtensor/src/migrations/migrate_rao.rs b/pallets/subtensor/src/migrations/migrate_rao.rs index 206fe33e5..d575c07f5 100644 --- a/pallets/subtensor/src/migrations/migrate_rao.rs +++ b/pallets/subtensor/src/migrations/migrate_rao.rs @@ -31,7 +31,7 @@ pub fn migrate_rao() -> Weight { weight = weight.saturating_add(T::DbWeight::get().reads_writes(netuids.len() as u64, 0)); // Set the Dynamic block. - DynamicBlock::::set( Pallet::::get_current_block_as_u64() ); + DynamicBlock::::set(Pallet::::get_current_block_as_u64()); // Migrate all TAO to root. Stake::::iter().for_each(|(hotkey, coldkey, stake)| { @@ -82,8 +82,7 @@ pub fn migrate_rao() -> Weight { // Set the token symbol for this subnet using Self instead of Pallet:: TokenSymbol::::insert(netuid, Pallet::::get_symbol_for_subnet(*netuid)); SubnetTAO::::insert(netuid, initial_liquidity); // Set TAO to the lock. - TotalStakeAtDynamic::::insert(netuid, 0); - + TotalStakeAtDynamic::::insert(netuid, 0); if let Ok(owner_coldkey) = SubnetOwner::::try_get(netuid) { // Set Owner as the coldkey. diff --git a/pallets/subtensor/src/staking/stake_utils.rs b/pallets/subtensor/src/staking/stake_utils.rs index 0aa18a742..eee75d01d 100644 --- a/pallets/subtensor/src/staking/stake_utils.rs +++ b/pallets/subtensor/src/staking/stake_utils.rs @@ -508,7 +508,6 @@ impl Pallet { /// /// Updates TaoIn, AlphaIn, and AlphaOut pub fn swap_tao_for_alpha(netuid: u16, tao: u64) -> u64 { - // Step 1: Get the mechanism type for the subnet (0 for Stable, 1 for Dynamic) let mechanism_id: u16 = SubnetMechanism::::get(netuid); // Step 2: Initialized vars. diff --git a/pallets/subtensor/src/subnets/subnet.rs b/pallets/subtensor/src/subnets/subnet.rs index e9ae94125..7b7de6aeb 100644 --- a/pallets/subtensor/src/subnets/subnet.rs +++ b/pallets/subtensor/src/subnets/subnet.rs @@ -247,7 +247,7 @@ impl Pallet { SubnetAlphaIn::::insert(netuid_to_register, pool_initial_tao); SubnetOwner::::insert(netuid_to_register, coldkey.clone()); SubnetOwnerHotkey::::insert(netuid_to_register, hotkey.clone()); - TotalStakeAtDynamic::::insert(netuid_to_register, TotalStake::::get() ); + TotalStakeAtDynamic::::insert(netuid_to_register, TotalStake::::get()); if actual_tao_lock_amount_less_pool_tao > 0 { Self::burn_tokens(actual_tao_lock_amount_less_pool_tao);