@@ -1712,48 +1712,48 @@ fn test_sets_a_lower_value_clears_small_nominations() {
17121712 } ) ;
17131713}
17141714
1715- #[ test]
1716- fn test_sudo_set_subnet_owner_hotkey ( ) {
1717- new_test_ext ( ) . execute_with ( || {
1718- let netuid = NetUid :: from ( 1 ) ;
1719-
1720- let coldkey: U256 = U256 :: from ( 1 ) ;
1721- let hotkey: U256 = U256 :: from ( 2 ) ;
1722- let new_hotkey: U256 = U256 :: from ( 3 ) ;
1723-
1724- let coldkey_origin = <<Test as Config >:: RuntimeOrigin >:: signed ( coldkey) ;
1725- let root = RuntimeOrigin :: root ( ) ;
1726- let random_account = RuntimeOrigin :: signed ( U256 :: from ( 123456 ) ) ;
1727-
1728- pallet_subtensor:: SubnetOwner :: < Test > :: insert ( netuid, coldkey) ;
1729- pallet_subtensor:: SubnetOwnerHotkey :: < Test > :: insert ( netuid, hotkey) ;
1730- assert_eq ! (
1731- pallet_subtensor:: SubnetOwnerHotkey :: <Test >:: get( netuid) ,
1732- hotkey
1733- ) ;
1734-
1735- assert_ok ! ( AdminUtils :: sudo_set_subnet_owner_hotkey(
1736- coldkey_origin,
1737- netuid,
1738- new_hotkey
1739- ) ) ;
1740-
1741- assert_eq ! (
1742- pallet_subtensor:: SubnetOwnerHotkey :: <Test >:: get( netuid) ,
1743- new_hotkey
1744- ) ;
1745-
1746- assert_noop ! (
1747- AdminUtils :: sudo_set_subnet_owner_hotkey( random_account, netuid, new_hotkey) ,
1748- DispatchError :: BadOrigin
1749- ) ;
1750-
1751- assert_noop ! (
1752- AdminUtils :: sudo_set_subnet_owner_hotkey( root, netuid, new_hotkey) ,
1753- DispatchError :: BadOrigin
1754- ) ;
1755- } ) ;
1756- }
1715+ // #[test]
1716+ // fn test_sudo_set_subnet_owner_hotkey() {
1717+ // new_test_ext().execute_with(|| {
1718+ // let netuid = NetUid::from(1);
1719+
1720+ // let coldkey: U256 = U256::from(1);
1721+ // let hotkey: U256 = U256::from(2);
1722+ // let new_hotkey: U256 = U256::from(3);
1723+
1724+ // let coldkey_origin = <<Test as Config>::RuntimeOrigin>::signed(coldkey);
1725+ // let root = RuntimeOrigin::root();
1726+ // let random_account = RuntimeOrigin::signed(U256::from(123456));
1727+
1728+ // pallet_subtensor::SubnetOwner::<Test>::insert(netuid, coldkey);
1729+ // pallet_subtensor::SubnetOwnerHotkey::<Test>::insert(netuid, hotkey);
1730+ // assert_eq!(
1731+ // pallet_subtensor::SubnetOwnerHotkey::<Test>::get(netuid),
1732+ // hotkey
1733+ // );
1734+
1735+ // assert_ok!(AdminUtils::sudo_set_subnet_owner_hotkey(
1736+ // coldkey_origin,
1737+ // netuid,
1738+ // new_hotkey
1739+ // ));
1740+
1741+ // assert_eq!(
1742+ // pallet_subtensor::SubnetOwnerHotkey::<Test>::get(netuid),
1743+ // new_hotkey
1744+ // );
1745+
1746+ // assert_noop!(
1747+ // AdminUtils::sudo_set_subnet_owner_hotkey(random_account, netuid, new_hotkey),
1748+ // DispatchError::BadOrigin
1749+ // );
1750+
1751+ // assert_noop!(
1752+ // AdminUtils::sudo_set_subnet_owner_hotkey(root, netuid, new_hotkey),
1753+ // DispatchError::BadOrigin
1754+ // );
1755+ // });
1756+ // }
17571757
17581758// cargo test --package pallet-admin-utils --lib -- tests::test_sudo_set_ema_halving --exact --show-output
17591759#[ test]
0 commit comments