Skip to content

Commit 3c0ffb1

Browse files
committed
Fix wrong way ensure for min burn value, fix outdated comments
1 parent 7e11d96 commit 3c0ffb1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pallets/admin-utils/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ pub mod pallet {
680680
);
681681
// Min burn must be less than max burn
682682
ensure!(
683-
min_burn > pallet_subtensor::Pallet::<T>::get_max_burn(netuid),
683+
min_burn <= pallet_subtensor::Pallet::<T>::get_max_burn(netuid),
684684
Error::<T>::ValueNotInBounds
685685
);
686686
pallet_subtensor::Pallet::<T>::set_min_burn(netuid, min_burn);
@@ -707,7 +707,7 @@ pub mod pallet {
707707
);
708708
// Max burn must be greater than 0.1 TAO.
709709
ensure!(
710-
max_burn > TaoCurrency::from(100_000_000),
710+
max_burn >= TaoCurrency::from(100_000_000),
711711
Error::<T>::ValueNotInBounds
712712
);
713713
// Max burn must be greater than min burn
@@ -1704,7 +1704,7 @@ pub mod pallet {
17041704
Ok(())
17051705
}
17061706

1707-
/// Sets the number of immune owner neurons
1707+
/// Sets the maximum allowed UIDs for a subnet
17081708
#[pallet::call_index(74)]
17091709
#[pallet::weight(Weight::from_parts(15_000_000, 0)
17101710
.saturating_add(<T as frame_system::Config>::DbWeight::get().reads(1_u64))

pallets/subtensor/src/subnets/uids.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ impl<T: Config> Pallet<T> {
9696
IsNetworkMember::<T>::insert(new_hotkey.clone(), netuid, true); // Fill network is member.
9797
}
9898

99-
/// Appends the uid to the network.
99+
/// Clears (sets to default) the neuron map values fot a neuron when it is
100+
/// removed from the subnet
100101
pub fn clear_neuron(netuid: NetUid, neuron_uid: u16) {
101102
let neuron_index: usize = neuron_uid.into();
102103
Emission::<T>::mutate(netuid, |v| Self::set_element_at(v, neuron_index, 0.into()));

0 commit comments

Comments
 (0)