Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions pallets/subtensor/src/staking/remove_stake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,6 @@ impl<T: Config> Pallet<T> {
// - 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<T::AccountId> = Vec::new();
let mut stakers: Vec<(T::AccountId, T::AccountId, u128)> = Vec::new();
let mut total_alpha_value_u128: u128 = 0;

Expand All @@ -495,9 +494,6 @@ impl<T: Config> Pallet<T> {
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);
Expand Down Expand Up @@ -579,7 +575,7 @@ impl<T: Config> Pallet<T> {
Alpha::<T>::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::<T>::remove(&hot, netuid);
TotalHotkeyShares::<T>::remove(&hot, netuid);
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// `spec_version`, and `authoring_version` are the same between Wasm and native.
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
// the compatible custom types.
spec_version: 365,
spec_version: 366,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down
Loading