Skip to content

Commit ff7d88b

Browse files
Update pallets/subtensor/src/tests/children.rs
Co-authored-by: Cameron Fairchild <[email protected]>
1 parent 8df905a commit ff7d88b

File tree

1 file changed

+0
-43
lines changed

1 file changed

+0
-43
lines changed

pallets/subtensor/src/tests/children.rs

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3748,49 +3748,6 @@ fn test_do_set_child_cooldown_period() {
37483748
});
37493749
}
37503750

3751-
// Test that setting childkeys requires minimum stake
3752-
#[test]
3753-
fn test_do_set_child_min_stake_check() {
3754-
new_test_ext(1).execute_with(|| {
3755-
let coldkey = U256::from(1);
3756-
let parent = U256::from(2);
3757-
let child = U256::from(3);
3758-
let netuid: u16 = 1;
3759-
let proportion: u64 = 1000;
3760-
3761-
// Add network and register hotkey
3762-
add_network(netuid, 13, 0);
3763-
register_ok_neuron(netuid, parent, coldkey, 0);
3764-
3765-
// Set below minimum stake for setting children
3766-
let parent_total_stake_original = TotalHotkeyStake::<Test>::get(parent);
3767-
StakeThreshold::<Test>::put(1_000_000_000_000);
3768-
TotalHotkeyStake::<Test>::insert(parent, StakeThreshold::<Test>::get() - 1);
3769-
3770-
// Schedule parent-child relationship
3771-
assert_err!(
3772-
SubtensorModule::do_schedule_children(
3773-
RuntimeOrigin::signed(coldkey),
3774-
parent,
3775-
netuid,
3776-
vec![(proportion, child)],
3777-
),
3778-
Error::<Test>::NotEnoughStakeToSetChildkeys
3779-
);
3780-
3781-
// Ensure the childkeys are not yet applied
3782-
let children_before = SubtensorModule::get_children(&parent, netuid);
3783-
assert_eq!(children_before, vec![]);
3784-
3785-
wait_and_set_pending_children(netuid);
3786-
TotalHotkeyStake::<Test>::insert(parent, parent_total_stake_original);
3787-
3788-
// Ensure the childkeys are still not applied
3789-
let children_after = SubtensorModule::get_children(&parent, netuid);
3790-
assert_eq!(children_after, vec![]);
3791-
});
3792-
}
3793-
37943751
// Test that revoking childkeys does not require minimum stake
37953752
#[test]
37963753
fn test_revoke_child_no_min_stake_check() {

0 commit comments

Comments
 (0)