diff --git a/pallets/subtensor/src/staking/remove_stake.rs b/pallets/subtensor/src/staking/remove_stake.rs index 423cb97493..74a6bf34a6 100644 --- a/pallets/subtensor/src/staking/remove_stake.rs +++ b/pallets/subtensor/src/staking/remove_stake.rs @@ -480,7 +480,6 @@ impl Pallet { // - per (hot,cold) α VALUE (not shares) with fallback to raw share if pool uninitialized, // - track hotkeys to clear pool totals. let mut keys_to_remove: Vec<(T::AccountId, T::AccountId)> = Vec::new(); - let mut hotkeys_seen: Vec = Vec::new(); let mut stakers: Vec<(T::AccountId, T::AccountId, u128)> = Vec::new(); let mut total_alpha_value_u128: u128 = 0; @@ -495,9 +494,6 @@ impl Pallet { continue; } keys_to_remove.push((hot.clone(), cold.clone())); - if !hotkeys_seen.contains(hot) { - hotkeys_seen.push(hot.clone()); - } // Primary: actual α value via share pool. let pool = Self::get_alpha_share_pool(hot.clone(), netuid); @@ -579,7 +575,7 @@ impl Pallet { Alpha::::remove((hot, cold, netuid)); } // 7.b) Clear share‑pool totals for each hotkey on this subnet. - for hot in hotkeys_seen { + for hot in hotkeys_in_subnet { TotalHotkeyAlpha::::remove(&hot, netuid); TotalHotkeyShares::::remove(&hot, netuid); }