@@ -450,9 +450,11 @@ fn test_swap_staking_hotkeys() {
450
450
let new_hotkey = U256 :: from ( 2 ) ;
451
451
let coldkey = U256 :: from ( 3 ) ;
452
452
let mut weight = Weight :: zero ( ) ;
453
+ let netuid = 1 ;
453
454
454
455
Stake :: < Test > :: insert ( old_hotkey, coldkey, 100 ) ;
455
456
StakingHotkeys :: < Test > :: insert ( coldkey, vec ! [ old_hotkey] ) ;
457
+ Alpha :: < Test > :: insert ( ( old_hotkey, coldkey, netuid) , U64F64 :: from_num ( 100 ) ) ;
456
458
457
459
assert_ok ! ( SubtensorModule :: perform_hotkey_swap(
458
460
& old_hotkey,
@@ -476,12 +478,16 @@ fn test_swap_hotkey_with_multiple_coldkeys() {
476
478
let coldkey1 = U256 :: from ( 3 ) ;
477
479
let coldkey2 = U256 :: from ( 4 ) ;
478
480
let mut weight = Weight :: zero ( ) ;
481
+ let netuid = 1 ;
479
482
480
483
Stake :: < Test > :: insert ( old_hotkey, coldkey1, 100 ) ;
481
484
Stake :: < Test > :: insert ( old_hotkey, coldkey2, 200 ) ;
482
485
StakingHotkeys :: < Test > :: insert ( coldkey1, vec ! [ old_hotkey] ) ;
483
486
StakingHotkeys :: < Test > :: insert ( coldkey2, vec ! [ old_hotkey] ) ;
484
487
488
+ Alpha :: < Test > :: insert ( ( old_hotkey, coldkey1, netuid) , U64F64 :: from_num ( 100 ) ) ;
489
+ Alpha :: < Test > :: insert ( ( old_hotkey, coldkey2, netuid) , U64F64 :: from_num ( 200 ) ) ;
490
+
485
491
assert_ok ! ( SubtensorModule :: perform_hotkey_swap(
486
492
& old_hotkey,
487
493
& new_hotkey,
@@ -558,10 +564,15 @@ fn test_swap_staking_hotkeys_multiple_coldkeys() {
558
564
let coldkey1 = U256 :: from ( 3 ) ;
559
565
let coldkey2 = U256 :: from ( 4 ) ;
560
566
let mut weight = Weight :: zero ( ) ;
567
+ let netuid = 1 ;
561
568
562
569
// Set up initial state
563
570
Stake :: < Test > :: insert ( old_hotkey, coldkey1, 100 ) ;
564
571
Stake :: < Test > :: insert ( old_hotkey, coldkey2, 200 ) ;
572
+
573
+ Alpha :: < Test > :: insert ( ( old_hotkey, coldkey1, netuid) , U64F64 :: from_num ( 100 ) ) ;
574
+ Alpha :: < Test > :: insert ( ( old_hotkey, coldkey2, netuid) , U64F64 :: from_num ( 200 ) ) ;
575
+
565
576
StakingHotkeys :: < Test > :: insert ( coldkey1, vec ! [ old_hotkey] ) ;
566
577
StakingHotkeys :: < Test > :: insert ( coldkey2, vec ! [ old_hotkey, U256 :: from( 5 ) ] ) ;
567
578
0 commit comments