@@ -172,6 +172,8 @@ fn test_do_set_child_singular_old_children_cleanup() {
172
172
vec![ ( proportion, old_child) ]
173
173
) ) ;
174
174
175
+ step_rate_limit ( & TransactionType :: SetChildren , netuid) ;
176
+
175
177
// Set new child
176
178
assert_ok ! ( SubtensorModule :: do_set_children(
177
179
RuntimeOrigin :: signed( coldkey) ,
@@ -260,6 +262,8 @@ fn test_do_set_child_singular_proportion_edge_cases() {
260
262
let children = SubtensorModule :: get_children ( & hotkey, netuid) ;
261
263
assert_eq ! ( children, vec![ ( min_proportion, child) ] ) ;
262
264
265
+ step_rate_limit ( & TransactionType :: SetChildren , netuid) ;
266
+
263
267
// Set child with maximum proportion
264
268
let max_proportion: u64 = u64:: MAX ;
265
269
assert_ok ! ( SubtensorModule :: do_set_children(
@@ -306,6 +310,8 @@ fn test_do_set_child_singular_multiple_children() {
306
310
vec![ ( proportion1, child1) ]
307
311
) ) ;
308
312
313
+ step_rate_limit ( & TransactionType :: SetChildren , netuid) ;
314
+
309
315
// Set second child
310
316
assert_ok ! ( SubtensorModule :: do_set_children(
311
317
RuntimeOrigin :: signed( coldkey) ,
@@ -467,6 +473,8 @@ fn test_do_revoke_child_singular_success() {
467
473
let children = SubtensorModule :: get_children ( & hotkey, netuid) ;
468
474
assert_eq ! ( children, vec![ ( proportion, child) ] ) ;
469
475
476
+ step_rate_limit ( & TransactionType :: SetChildren , netuid) ;
477
+
470
478
// Revoke child
471
479
assert_ok ! ( SubtensorModule :: do_set_children(
472
480
RuntimeOrigin :: signed( coldkey) ,
@@ -764,6 +772,8 @@ fn test_do_set_children_multiple_old_children_cleanup() {
764
772
vec![ ( proportion, old_child) ]
765
773
) ) ;
766
774
775
+ step_rate_limit ( & TransactionType :: SetChildren , netuid) ;
776
+
767
777
// Set new children
768
778
assert_ok ! ( SubtensorModule :: do_set_children(
769
779
RuntimeOrigin :: signed( coldkey) ,
@@ -854,6 +864,8 @@ fn test_do_set_children_multiple_overwrite_existing() {
854
864
vec![ ( proportion, child1) , ( proportion, child2) ]
855
865
) ) ;
856
866
867
+ step_rate_limit ( & TransactionType :: SetChildren , netuid) ;
868
+
857
869
// Overwrite with new children
858
870
assert_ok ! ( SubtensorModule :: do_set_children(
859
871
RuntimeOrigin :: signed( coldkey) ,
@@ -1199,6 +1211,8 @@ fn test_do_revoke_children_multiple_success() {
1199
1211
vec![ ( proportion1, child1) , ( proportion2, child2) ]
1200
1212
) ) ;
1201
1213
1214
+ step_rate_limit ( & TransactionType :: SetChildren , netuid) ;
1215
+
1202
1216
// Revoke multiple children
1203
1217
assert_ok ! ( SubtensorModule :: do_set_children(
1204
1218
RuntimeOrigin :: signed( coldkey) ,
@@ -1313,6 +1327,8 @@ fn test_do_revoke_children_multiple_partial_revocation() {
1313
1327
]
1314
1328
) ) ;
1315
1329
1330
+ step_rate_limit ( & TransactionType :: SetChildren , netuid) ;
1331
+
1316
1332
// Revoke only child3
1317
1333
assert_ok ! ( SubtensorModule :: do_set_children(
1318
1334
RuntimeOrigin :: signed( coldkey) ,
@@ -1364,6 +1380,8 @@ fn test_do_revoke_children_multiple_non_existent_children() {
1364
1380
vec![ ( proportion, child1) ]
1365
1381
) ) ;
1366
1382
1383
+ step_rate_limit ( & TransactionType :: SetChildren , netuid) ;
1384
+
1367
1385
// Attempt to revoke existing and non-existent children
1368
1386
assert_ok ! ( SubtensorModule :: do_set_children(
1369
1387
RuntimeOrigin :: signed( coldkey) ,
@@ -1450,6 +1468,8 @@ fn test_do_revoke_children_multiple_complex_scenario() {
1450
1468
]
1451
1469
) ) ;
1452
1470
1471
+ step_rate_limit ( & TransactionType :: SetChildren , netuid) ;
1472
+
1453
1473
// Revoke child2
1454
1474
assert_ok ! ( SubtensorModule :: do_set_children(
1455
1475
RuntimeOrigin :: signed( coldkey) ,
@@ -1466,6 +1486,8 @@ fn test_do_revoke_children_multiple_complex_scenario() {
1466
1486
let parents2 = SubtensorModule :: get_parents ( & child2, netuid) ;
1467
1487
assert ! ( parents2. is_empty( ) ) ;
1468
1488
1489
+ step_rate_limit ( & TransactionType :: SetChildren , netuid) ;
1490
+
1469
1491
// Revoke remaining children
1470
1492
assert_ok ! ( SubtensorModule :: do_set_children(
1471
1493
RuntimeOrigin :: signed( coldkey) ,
0 commit comments