Skip to content

Commit 9e27fff

Browse files
committed
taoflow hotfix
1 parent 575262e commit 9e27fff

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

pallets/subtensor/src/staking/stake_utils.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,13 @@ impl<T: Config> Pallet<T> {
862862
netuid,
863863
alpha,
864864
);
865+
if netuid == NetUid::ROOT {
866+
Self::remove_stake_adjust_root_claimed_for_hotkey_and_coldkey(
867+
origin_hotkey,
868+
origin_coldkey,
869+
alpha,
870+
);
871+
}
865872

866873
// Increase alpha on destination keys
867874
let actual_alpha_moved = Self::increase_stake_for_hotkey_and_coldkey_on_subnet(
@@ -870,6 +877,13 @@ impl<T: Config> Pallet<T> {
870877
netuid,
871878
actual_alpha_decrease,
872879
);
880+
if netuid == NetUid::ROOT {
881+
Self::add_stake_adjust_root_claimed_for_hotkey_and_coldkey(
882+
destination_hotkey,
883+
destination_coldkey,
884+
actual_alpha_decrease.into(),
885+
);
886+
}
873887

874888
// Calculate TAO equivalent based on current price (it is accurate because
875889
// there's no slippage in this move)

0 commit comments

Comments
 (0)