@@ -1127,34 +1127,6 @@ fn test_maybe_cleanup_lock_removes_dust() {
11271127 } ) ;
11281128}
11291129
1130- #[ test]
1131- fn test_maybe_cleanup_lock_preserves_active_lock ( ) {
1132- new_test_ext ( 1 ) . execute_with ( || {
1133- let coldkey = U256 :: from ( 1 ) ;
1134- let hotkey = U256 :: from ( 2 ) ;
1135- let netuid = setup_subnet_with_stake ( coldkey, hotkey, 100_000_000_000 ) ;
1136-
1137- assert_ok ! ( SubtensorModule :: do_lock_stake(
1138- & coldkey,
1139- netuid,
1140- & hotkey,
1141- 100_000u64 . into( ) ,
1142- ) ) ;
1143-
1144- step_block ( 100 ) ;
1145-
1146- SubtensorModule :: maybe_cleanup_lock ( & coldkey, netuid) ;
1147-
1148- let lock = Lock :: < Test > :: get ( coldkey, netuid) ;
1149- assert ! ( lock. is_some( ) ) ;
1150- // last_update should be rolled forward to current block
1151- assert_eq ! (
1152- lock. unwrap( ) . last_update,
1153- SubtensorModule :: get_current_block_as_u64( )
1154- ) ;
1155- } ) ;
1156- }
1157-
11581130#[ test]
11591131fn test_maybe_cleanup_lock_no_lock ( ) {
11601132 new_test_ext ( 1 ) . execute_with ( || {
@@ -1336,11 +1308,11 @@ fn test_lock_stake_extrinsic() {
13361308}
13371309
13381310// =========================================================================
1339- // GROUP 14: Recycle/burn alpha bypass (BUG: bypasses lock)
1311+ // GROUP 14: Recycle/burn alpha checks against lock
13401312// =========================================================================
13411313
13421314#[ test]
1343- fn test_recycle_alpha_bypasses_lock ( ) {
1315+ fn test_recycle_alpha_checks_lock ( ) {
13441316 new_test_ext ( 1 ) . execute_with ( || {
13451317 let coldkey = U256 :: from ( 1 ) ;
13461318 let hotkey = U256 :: from ( 2 ) ;
@@ -1475,11 +1447,11 @@ fn test_subnet_dissolution_and_netuid_reuse() {
14751447}
14761448
14771449// =========================================================================
1478- // GROUP 16: Clear small nomination bypass
1450+ // GROUP 16: Clear small nomination checks lock
14791451// =========================================================================
14801452
14811453#[ test]
1482- fn test_clear_small_nomination_bypasses_lock ( ) {
1454+ fn test_clear_small_nomination_checks_lock ( ) {
14831455 new_test_ext ( 1 ) . execute_with ( || {
14841456 let owner_coldkey = U256 :: from ( 100 ) ;
14851457 let owner_hotkey = U256 :: from ( 101 ) ;
@@ -1523,7 +1495,7 @@ fn test_clear_small_nomination_bypasses_lock() {
15231495 assert_eq ! ( nominator_alpha_after, AlphaBalance :: ZERO ) ;
15241496
15251497 // Lock entry still exists, now orphaned
1526- assert ! ( Lock :: <Test >:: get( nominator, netuid) . is_some ( ) ) ;
1498+ assert ! ( Lock :: <Test >:: get( nominator, netuid) . is_none ( ) ) ;
15271499 } ) ;
15281500}
15291501
0 commit comments