Skip to content
Merged
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
4 changes: 2 additions & 2 deletions pallets/subtensor/src/staking/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ impl<T: Config> Pallet<T> {
) {
// Verify if the account is a nominator account by checking ownership of the hotkey by the coldkey.
if !Self::coldkey_owns_hotkey(coldkey, hotkey) {
// If the stake is below the minimum required, it's considered a small nomination and needs to be cleared.
// If the stake is non-zero and below the minimum required, it's considered a small nomination and needs to be cleared.
// Log if the stake is below the minimum required
let alpha_stake =
Self::get_stake_for_hotkey_and_coldkey_on_subnet(hotkey, coldkey, netuid);
let min_alpha_stake =
U96F32::saturating_from_num(Self::get_nominator_min_required_stake())
.safe_div(T::SwapInterface::current_alpha_price(netuid))
.saturating_to_num::<u64>();
if alpha_stake < min_alpha_stake.into() {
if alpha_stake > 0.into() && alpha_stake < min_alpha_stake.into() {
// Log the clearing of a small nomination
// Remove the stake from the nominator account. (this is a more forceful unstake operation which )
// Actually deletes the staking account.
Expand Down
Loading