Skip to content

Commit d30f9d1

Browse files
committed
chore: fmt
1 parent 2dd0606 commit d30f9d1

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

pallets/subtensor/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ pub mod pallet {
975975
#[pallet::storage] // --- DMAP ( netuid ) --> subnet_name | Returns the name of the subnet.
976976
pub type SubnetName<T: Config> =
977977
StorageMap<_, Identity, u16, Vec<u8>, ValueQuery, DefaultUnicodeVecU8<T>>;
978-
978+
979979
/// ============================
980980
/// ==== Global Parameters =====
981981
/// ============================

pallets/subtensor/src/migrations/migrate_rao.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub fn migrate_rao<T: Config>() -> Weight {
3131
weight = weight.saturating_add(T::DbWeight::get().reads_writes(netuids.len() as u64, 0));
3232

3333
// Set the Dynamic block.
34-
DynamicBlock::<T>::set( Pallet::<T>::get_current_block_as_u64() );
34+
DynamicBlock::<T>::set(Pallet::<T>::get_current_block_as_u64());
3535

3636
// Migrate all TAO to root.
3737
Stake::<T>::iter().for_each(|(hotkey, coldkey, stake)| {
@@ -82,8 +82,7 @@ pub fn migrate_rao<T: Config>() -> Weight {
8282
// Set the token symbol for this subnet using Self instead of Pallet::<T>
8383
TokenSymbol::<T>::insert(netuid, Pallet::<T>::get_symbol_for_subnet(*netuid));
8484
SubnetTAO::<T>::insert(netuid, initial_liquidity); // Set TAO to the lock.
85-
TotalStakeAtDynamic::<T>::insert(netuid, 0);
86-
85+
TotalStakeAtDynamic::<T>::insert(netuid, 0);
8786

8887
if let Ok(owner_coldkey) = SubnetOwner::<T>::try_get(netuid) {
8988
// Set Owner as the coldkey.

pallets/subtensor/src/staking/stake_utils.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,6 @@ impl<T: Config> Pallet<T> {
508508
///
509509
/// Updates TaoIn, AlphaIn, and AlphaOut
510510
pub fn swap_tao_for_alpha(netuid: u16, tao: u64) -> u64 {
511-
512511
// Step 1: Get the mechanism type for the subnet (0 for Stable, 1 for Dynamic)
513512
let mechanism_id: u16 = SubnetMechanism::<T>::get(netuid);
514513
// Step 2: Initialized vars.

pallets/subtensor/src/subnets/subnet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ impl<T: Config> Pallet<T> {
247247
SubnetAlphaIn::<T>::insert(netuid_to_register, pool_initial_tao);
248248
SubnetOwner::<T>::insert(netuid_to_register, coldkey.clone());
249249
SubnetOwnerHotkey::<T>::insert(netuid_to_register, hotkey.clone());
250-
TotalStakeAtDynamic::<T>::insert(netuid_to_register, TotalStake::<T>::get() );
250+
TotalStakeAtDynamic::<T>::insert(netuid_to_register, TotalStake::<T>::get());
251251

252252
if actual_tao_lock_amount_less_pool_tao > 0 {
253253
Self::burn_tokens(actual_tao_lock_amount_less_pool_tao);

0 commit comments

Comments
 (0)