Skip to content

Commit 16d636a

Browse files
committed
use check helper in set weights call
1 parent eea273a commit 16d636a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pallets/subtensor/src/subnets/weights.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ impl<T: Config> Pallet<T> {
226226
Error::<T>::HotKeyNotRegisteredInSubNet
227227
);
228228

229-
// --- 6. Check to see if the hotkey has enought stake to set weights.
229+
// --- 6. Check to see if the hotkey has enough stake to set weights.
230230
ensure!(
231-
Self::get_total_stake_for_hotkey(&hotkey) >= Self::get_weights_min_stake(),
231+
Self::check_weights_min_stake(&hotkey, netuid),
232232
Error::<T>::NotEnoughStakeToSetWeights
233233
);
234234

0 commit comments

Comments
 (0)