Skip to content

Commit bbbfb3a

Browse files
committed
update existing tests
1 parent 271af2b commit bbbfb3a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

pallets/subtensor/src/tests/difficulty.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ fn test_registration_difficulty_adjustment() {
1313
let tempo: u16 = 1;
1414
let modality: u16 = 1;
1515
add_network(netuid, tempo, modality);
16+
17+
// owners are not deregistered
18+
crate::SubnetOwner::<Test>::insert(netuid, U256::from(99999));
19+
1620
SubtensorModule::set_min_difficulty(netuid, 10000);
1721
assert_eq!(SubtensorModule::get_difficulty_as_u64(netuid), 10000); // Check initial difficulty.
1822
assert_eq!(SubtensorModule::get_last_adjustment_block(netuid), 0); // Last adjustment block starts at 0.

pallets/subtensor/src/tests/registration.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,6 +1560,12 @@ fn test_full_pass_through() {
15601560
add_network(netuid1, tempo1, 0);
15611561
add_network(netuid2, tempo2, 0);
15621562

1563+
// owners are not deregisterd
1564+
let dummy_owner = U256::from(99999);
1565+
crate::SubnetOwner::<Test>::insert(netuid0, dummy_owner);
1566+
crate::SubnetOwner::<Test>::insert(netuid1, dummy_owner);
1567+
crate::SubnetOwner::<Test>::insert(netuid2, dummy_owner);
1568+
15631569
// Check their tempo.
15641570
assert_eq!(SubtensorModule::get_tempo(netuid0), tempo0);
15651571
assert_eq!(SubtensorModule::get_tempo(netuid1), tempo1);

0 commit comments

Comments
 (0)