Skip to content

Commit

Permalink
Fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
ales-otf committed Dec 20, 2024
1 parent b17c9da commit 8d2e05a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pallets/subtensor/src/coinbase/run_coinbase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl<T: Config> Pallet<T> {
// --- 3. Drain the subnet block emission and accumulate it as subnet emission, which increases until the tempo is reached in #4.
// subnet_blockwise_emission -> subnet_pending_emission
for netuid in subnets.clone().iter() {
if *netuid == 0 || !Self::get_network_registration_allowed(*netuid) {
if *netuid == 0 || !NetworkRegistrationAllowed::<T>::get(*netuid) {
continue;
}
// --- 3.1 Get the network's block-wise emission amount.
Expand Down Expand Up @@ -121,7 +121,7 @@ impl<T: Config> Pallet<T> {
BlocksSinceLastStep::<T>::insert(*netuid, 0);
LastMechansimStepBlock::<T>::insert(*netuid, current_block);

if *netuid == 0 || !Self::get_network_registration_allowed(*netuid) {
if *netuid == 0 || !NetworkRegistrationAllowed::<T>::get(*netuid) {
// Skip netuid 0 payouts
continue;
}
Expand Down
8 changes: 4 additions & 4 deletions pallets/subtensor/src/tests/children.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3750,14 +3750,14 @@ fn test_revoke_child_no_min_stake_check() {
));

// Ensure the childkeys are not yet applied
let children_before = SubtensorModule::get_children(&parent, netuid);
let children_before = ChildKeys::<Test>::get(parent, netuid);
assert_eq!(children_before, vec![]);

wait_and_set_pending_children(netuid);
TotalHotkeyStake::<Test>::insert(parent, parent_total_stake_original);

// Ensure the childkeys are applied
let children_after = SubtensorModule::get_children(&parent, netuid);
let children_after = ChildKeys::<Test>::get(parent, netuid);
assert_eq!(children_after, vec![(proportion, child)]);

// Reduce the stake below required threshold
Expand All @@ -3783,7 +3783,7 @@ fn test_revoke_child_no_min_stake_check() {
TotalHotkeyStake::<Test>::insert(parent, parent_total_stake_original);

// Ensure the childkeys are revoked
let children_after = SubtensorModule::get_children(&parent, netuid);
let children_after = ChildKeys::<Test>::get(parent, netuid);
assert_eq!(children_after, vec![]);
});
}
Expand Down Expand Up @@ -3822,7 +3822,7 @@ fn test_do_set_child_registration_disabled() {
TotalHotkeyStake::<Test>::insert(parent, parent_total_stake_original);

// Ensure the childkeys are applied
let children_after = SubtensorModule::get_children(&parent, netuid);
let children_after = ChildKeys::<Test>::get(parent, netuid);
assert_eq!(children_after, vec![(proportion, child)]);
});
}

0 comments on commit 8d2e05a

Please sign in to comment.