Skip to content

Commit 4ac0e73

Browse files
committed
update trim test to check UID map changed
1 parent 40945a9 commit 4ac0e73

File tree

1 file changed

+7
-0
lines changed
  • pallets/admin-utils/src/tests

1 file changed

+7
-0
lines changed

pallets/admin-utils/src/tests/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2631,6 +2631,13 @@ fn test_trim_to_max_allowed_uids() {
26312631
// Actual number of neurons on the network updated after trimming
26322632
assert_eq!(SubnetworkN::<Test>::get(netuid), new_max_n);
26332633

2634+
for i in 0..new_max_n {
2635+
let i = i as u16;
2636+
let hotkey = Keys::<Test>::get(netuid, i);
2637+
let uid = Uids::<Test>::get(netuid, hotkey);
2638+
assert_eq!(uid.unwrap(), i);
2639+
}
2640+
26342641
// Non existent subnet
26352642
assert_err!(
26362643
AdminUtils::sudo_trim_to_max_allowed_uids(

0 commit comments

Comments
 (0)