@@ -1745,48 +1745,48 @@ fn test_sets_a_lower_value_clears_small_nominations() {
17451745 } ) ;
17461746}
17471747
1748- #[ test]
1749- fn test_sudo_set_subnet_owner_hotkey ( ) {
1750- new_test_ext ( ) . execute_with ( || {
1751- let netuid = NetUid :: from ( 1 ) ;
1752-
1753- let coldkey: U256 = U256 :: from ( 1 ) ;
1754- let hotkey: U256 = U256 :: from ( 2 ) ;
1755- let new_hotkey: U256 = U256 :: from ( 3 ) ;
1756-
1757- let coldkey_origin = <<Test as Config >:: RuntimeOrigin >:: signed ( coldkey) ;
1758- let root = RuntimeOrigin :: root ( ) ;
1759- let random_account = RuntimeOrigin :: signed ( U256 :: from ( 123456 ) ) ;
1760-
1761- pallet_subtensor:: SubnetOwner :: < Test > :: insert ( netuid, coldkey) ;
1762- pallet_subtensor:: SubnetOwnerHotkey :: < Test > :: insert ( netuid, hotkey) ;
1763- assert_eq ! (
1764- pallet_subtensor:: SubnetOwnerHotkey :: <Test >:: get( netuid) ,
1765- hotkey
1766- ) ;
1767-
1768- assert_ok ! ( AdminUtils :: sudo_set_subnet_owner_hotkey(
1769- coldkey_origin,
1770- netuid,
1771- new_hotkey
1772- ) ) ;
1773-
1774- assert_eq ! (
1775- pallet_subtensor:: SubnetOwnerHotkey :: <Test >:: get( netuid) ,
1776- new_hotkey
1777- ) ;
1778-
1779- assert_noop ! (
1780- AdminUtils :: sudo_set_subnet_owner_hotkey( random_account, netuid, new_hotkey) ,
1781- DispatchError :: BadOrigin
1782- ) ;
1783-
1784- assert_noop ! (
1785- AdminUtils :: sudo_set_subnet_owner_hotkey( root, netuid, new_hotkey) ,
1786- DispatchError :: BadOrigin
1787- ) ;
1788- } ) ;
1789- }
1748+ // #[test]
1749+ // fn test_sudo_set_subnet_owner_hotkey() {
1750+ // new_test_ext().execute_with(|| {
1751+ // let netuid = NetUid::from(1);
1752+
1753+ // let coldkey: U256 = U256::from(1);
1754+ // let hotkey: U256 = U256::from(2);
1755+ // let new_hotkey: U256 = U256::from(3);
1756+
1757+ // let coldkey_origin = <<Test as Config>::RuntimeOrigin>::signed(coldkey);
1758+ // let root = RuntimeOrigin::root();
1759+ // let random_account = RuntimeOrigin::signed(U256::from(123456));
1760+
1761+ // pallet_subtensor::SubnetOwner::<Test>::insert(netuid, coldkey);
1762+ // pallet_subtensor::SubnetOwnerHotkey::<Test>::insert(netuid, hotkey);
1763+ // assert_eq!(
1764+ // pallet_subtensor::SubnetOwnerHotkey::<Test>::get(netuid),
1765+ // hotkey
1766+ // );
1767+
1768+ // assert_ok!(AdminUtils::sudo_set_subnet_owner_hotkey(
1769+ // coldkey_origin,
1770+ // netuid,
1771+ // new_hotkey
1772+ // ));
1773+
1774+ // assert_eq!(
1775+ // pallet_subtensor::SubnetOwnerHotkey::<Test>::get(netuid),
1776+ // new_hotkey
1777+ // );
1778+
1779+ // assert_noop!(
1780+ // AdminUtils::sudo_set_subnet_owner_hotkey(random_account, netuid, new_hotkey),
1781+ // DispatchError::BadOrigin
1782+ // );
1783+
1784+ // assert_noop!(
1785+ // AdminUtils::sudo_set_subnet_owner_hotkey(root, netuid, new_hotkey),
1786+ // DispatchError::BadOrigin
1787+ // );
1788+ // });
1789+ // }
17901790
17911791// cargo test --package pallet-admin-utils --lib -- tests::test_sudo_set_ema_halving --exact --show-output
17921792#[ test]
0 commit comments