Skip to content

Commit

Permalink
add back delta handling in helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
camfairchild committed Nov 7, 2024
1 parent a1ccc76 commit 59e53be
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pallets/subtensor/src/staking/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ impl<T: Config> Pallet<T> {
staking_hotkeys.retain(|h| h != hotkey);
StakingHotkeys::<T>::insert(coldkey, staking_hotkeys);

// Update stake delta
StakeDeltaSinceLastEmissionDrain::<T>::remove(hotkey, coldkey);

current_stake
}

Expand Down Expand Up @@ -431,6 +434,9 @@ impl<T: Config> Pallet<T> {

// Add the balance to the coldkey account.
Self::add_balance_to_coldkey_account(&delegate_coldkey_i, stake_i);

// Remove stake delta
StakeDeltaSinceLastEmissionDrain::<T>::remove(hotkey, &delegate_coldkey_i);
}
}
}

0 comments on commit 59e53be

Please sign in to comment.