Skip to content

Commit bfd67c8

Browse files
committed
doc: add comments
1 parent cc06539 commit bfd67c8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pallets/subtensor/src/staking.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ impl<T: Config> Pallet<T> {
167167

168168
// --- 7. If this is a nomination stake, check if total stake after adding will be above
169169
// the minimum required stake.
170+
171+
// If coldkey is not owner of the hotkey, it's a nomination stake.
170172
if !Self::coldkey_owns_hotkey(&coldkey, &hotkey) {
171173
let total_stake_after_add =
172174
Stake::<T>::get(&hotkey, &coldkey).saturating_add(stake_to_be_added);
@@ -296,6 +298,8 @@ impl<T: Config> Pallet<T> {
296298

297299
// --- 7. If this is a nomination stake, check if total stake after removing will be above
298300
// the minimum required stake.
301+
302+
// If coldkey is not owner of the hotkey, it's a nomination stake.
299303
if !Self::coldkey_owns_hotkey(&coldkey, &hotkey) {
300304
let total_stake_after_remove =
301305
Stake::<T>::get(&hotkey, &coldkey).saturating_sub(stake_to_be_removed);

0 commit comments

Comments
 (0)