@@ -90,14 +90,14 @@ pub fn finney_mainnet_config() -> Result<ChainSpec, String> {
9090 Vec < ( sp_runtime:: AccountId32 , ( u64 , u16 ) ) > ,
9191 ) > = Vec :: new ( ) ;
9292 for ( coldkey_str, hotkeys) in old_state. stakes . iter ( ) {
93- let coldkey = <sr25519:: Public as Ss58Codec >:: from_ss58check ( & coldkey_str) . unwrap ( ) ;
93+ let coldkey = <sr25519:: Public as Ss58Codec >:: from_ss58check ( coldkey_str) . unwrap ( ) ;
9494 let coldkey_account = sp_runtime:: AccountId32 :: from ( coldkey) ;
9595
9696 let mut processed_hotkeys: Vec < ( sp_runtime:: AccountId32 , ( u64 , u16 ) ) > = Vec :: new ( ) ;
9797
9898 for ( hotkey_str, amount_uid) in hotkeys. iter ( ) {
9999 let ( amount, uid) = amount_uid;
100- let hotkey = <sr25519:: Public as Ss58Codec >:: from_ss58check ( & hotkey_str) . unwrap ( ) ;
100+ let hotkey = <sr25519:: Public as Ss58Codec >:: from_ss58check ( hotkey_str) . unwrap ( ) ;
101101 let hotkey_account = sp_runtime:: AccountId32 :: from ( hotkey) ;
102102
103103 processed_hotkeys. push ( ( hotkey_account, ( * amount, * uid) ) ) ;
@@ -109,7 +109,7 @@ pub fn finney_mainnet_config() -> Result<ChainSpec, String> {
109109 let mut balances_issuance: u64 = 0 ;
110110 let mut processed_balances: Vec < ( sp_runtime:: AccountId32 , u64 ) > = Vec :: new ( ) ;
111111 for ( key_str, amount) in old_state. balances . iter ( ) {
112- let key = <sr25519:: Public as Ss58Codec >:: from_ss58check ( & key_str) . unwrap ( ) ;
112+ let key = <sr25519:: Public as Ss58Codec >:: from_ss58check ( key_str) . unwrap ( ) ;
113113 let key_account = sp_runtime:: AccountId32 :: from ( key) ;
114114
115115 processed_balances. push ( ( key_account, * amount) ) ;
@@ -266,14 +266,14 @@ pub fn finney_testnet_config() -> Result<ChainSpec, String> {
266266 Vec < ( sp_runtime:: AccountId32 , ( u64 , u16 ) ) > ,
267267 ) > = Vec :: new ( ) ;
268268 for ( coldkey_str, hotkeys) in old_state. stakes . iter ( ) {
269- let coldkey = <sr25519:: Public as Ss58Codec >:: from_ss58check ( & coldkey_str) . unwrap ( ) ;
269+ let coldkey = <sr25519:: Public as Ss58Codec >:: from_ss58check ( coldkey_str) . unwrap ( ) ;
270270 let coldkey_account = sp_runtime:: AccountId32 :: from ( coldkey) ;
271271
272272 let mut processed_hotkeys: Vec < ( sp_runtime:: AccountId32 , ( u64 , u16 ) ) > = Vec :: new ( ) ;
273273
274274 for ( hotkey_str, amount_uid) in hotkeys. iter ( ) {
275275 let ( amount, uid) = amount_uid;
276- let hotkey = <sr25519:: Public as Ss58Codec >:: from_ss58check ( & hotkey_str) . unwrap ( ) ;
276+ let hotkey = <sr25519:: Public as Ss58Codec >:: from_ss58check ( hotkey_str) . unwrap ( ) ;
277277 let hotkey_account = sp_runtime:: AccountId32 :: from ( hotkey) ;
278278
279279 processed_hotkeys. push ( ( hotkey_account, ( * amount, * uid) ) ) ;
@@ -285,7 +285,7 @@ pub fn finney_testnet_config() -> Result<ChainSpec, String> {
285285 let mut balances_issuance: u64 = 0 ;
286286 let mut processed_balances: Vec < ( sp_runtime:: AccountId32 , u64 ) > = Vec :: new ( ) ;
287287 for ( key_str, amount) in old_state. balances . iter ( ) {
288- let key = <sr25519:: Public as Ss58Codec >:: from_ss58check ( & key_str) . unwrap ( ) ;
288+ let key = <sr25519:: Public as Ss58Codec >:: from_ss58check ( key_str) . unwrap ( ) ;
289289 let key_account = sp_runtime:: AccountId32 :: from ( key) ;
290290
291291 processed_balances. push ( ( key_account, * amount) ) ;
@@ -570,7 +570,7 @@ fn finney_genesis(
570570 balances : BalancesConfig {
571571 // Configure endowed accounts with initial balance of 1 << 60.
572572 //balances: balances.iter().cloned().map(|k| k).collect(),
573- balances : balances. iter ( ) . cloned ( ) . map ( |k| k ) . collect ( ) ,
573+ balances : balances. to_vec ( ) ,
574574 } ,
575575 aura : AuraConfig {
576576 authorities : initial_authorities. iter ( ) . map ( |x| ( x. 0 . clone ( ) ) ) . collect ( ) ,
@@ -590,8 +590,8 @@ fn finney_genesis(
590590 } ,
591591 transaction_payment : Default :: default ( ) ,
592592 subtensor_module : SubtensorModuleConfig {
593- stakes : stakes ,
594- balances_issuance : balances_issuance ,
593+ stakes,
594+ balances_issuance,
595595 } ,
596596 triumvirate : TriumvirateConfig {
597597 // Add initial authorities as collective members
0 commit comments