From 8d2e05a2b7b884bc323b9cee33e57eb5ce9c2f66 Mon Sep 17 00:00:00 2001 From: Aliaksandr Tsurko Date: Fri, 20 Dec 2024 19:35:25 +0100 Subject: [PATCH] Fix rebase --- pallets/subtensor/src/coinbase/run_coinbase.rs | 4 ++-- pallets/subtensor/src/tests/children.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pallets/subtensor/src/coinbase/run_coinbase.rs b/pallets/subtensor/src/coinbase/run_coinbase.rs index ce948d32d..c70457ff5 100644 --- a/pallets/subtensor/src/coinbase/run_coinbase.rs +++ b/pallets/subtensor/src/coinbase/run_coinbase.rs @@ -65,7 +65,7 @@ impl Pallet { // --- 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::::get(*netuid) { continue; } // --- 3.1 Get the network's block-wise emission amount. @@ -121,7 +121,7 @@ impl Pallet { BlocksSinceLastStep::::insert(*netuid, 0); LastMechansimStepBlock::::insert(*netuid, current_block); - if *netuid == 0 || !Self::get_network_registration_allowed(*netuid) { + if *netuid == 0 || !NetworkRegistrationAllowed::::get(*netuid) { // Skip netuid 0 payouts continue; } diff --git a/pallets/subtensor/src/tests/children.rs b/pallets/subtensor/src/tests/children.rs index a96632337..209ef902b 100644 --- a/pallets/subtensor/src/tests/children.rs +++ b/pallets/subtensor/src/tests/children.rs @@ -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::::get(parent, netuid); assert_eq!(children_before, vec![]); wait_and_set_pending_children(netuid); TotalHotkeyStake::::insert(parent, parent_total_stake_original); // Ensure the childkeys are applied - let children_after = SubtensorModule::get_children(&parent, netuid); + let children_after = ChildKeys::::get(parent, netuid); assert_eq!(children_after, vec![(proportion, child)]); // Reduce the stake below required threshold @@ -3783,7 +3783,7 @@ fn test_revoke_child_no_min_stake_check() { TotalHotkeyStake::::insert(parent, parent_total_stake_original); // Ensure the childkeys are revoked - let children_after = SubtensorModule::get_children(&parent, netuid); + let children_after = ChildKeys::::get(parent, netuid); assert_eq!(children_after, vec![]); }); } @@ -3822,7 +3822,7 @@ fn test_do_set_child_registration_disabled() { TotalHotkeyStake::::insert(parent, parent_total_stake_original); // Ensure the childkeys are applied - let children_after = SubtensorModule::get_children(&parent, netuid); + let children_after = ChildKeys::::get(parent, netuid); assert_eq!(children_after, vec![(proportion, child)]); }); }