File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -476,11 +476,11 @@ impl<T: Config> Pallet<T> {
476476
477477 // Get the hotkey's stake including weight
478478 let root_stake: I96F32 = I96F32 :: from_num ( Self :: get_stake_for_hotkey_on_subnet (
479- & hotkey,
479+ hotkey,
480480 Self :: get_root_netuid ( ) ,
481481 ) ) ;
482482 let alpha_stake: I96F32 =
483- I96F32 :: from_num ( Self :: get_stake_for_hotkey_on_subnet ( & hotkey, netuid) ) ;
483+ I96F32 :: from_num ( Self :: get_stake_for_hotkey_on_subnet ( hotkey, netuid) ) ;
484484
485485 // Calculate the
486486 let alpha_contribution: I96F32 = alpha_stake. saturating_mul ( remaining_proportion) ;
Original file line number Diff line number Diff line change @@ -106,11 +106,11 @@ impl<T: Config> Pallet<T> {
106106
107107 // Step 1: Get stake of hotkey (neuron)
108108 let alpha_stake =
109- I64F64 :: from_num ( Self :: get_inherited_for_hotkey_on_subnet ( & hotkey, netuid) ) ;
109+ I64F64 :: from_num ( Self :: get_inherited_for_hotkey_on_subnet ( hotkey, netuid) ) ;
110110 log:: trace!( "alpha_stake: {:?}" , alpha_stake) ;
111111
112112 // Step 2: Get the global tao stake for the hotkey
113- let tao_stake = I64F64 :: from_num ( Self :: get_inherited_for_hotkey_on_subnet ( & hotkey, 0 ) ) ;
113+ let tao_stake = I64F64 :: from_num ( Self :: get_inherited_for_hotkey_on_subnet ( hotkey, 0 ) ) ;
114114 log:: trace!( "tao_stake: {:?}" , tao_stake) ;
115115
116116 // Step 3: Combine alpha and tao stakes
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ use sp_core::U256;
77use substrate_fixed:: types:: I64F64 ;
88use substrate_fixed:: types:: I96F32 ;
99
10+ #[ allow( clippy:: arithmetic_side_effects) ]
1011fn close ( value : u64 , target : u64 , eps : u64 ) {
1112 assert ! (
1213 ( value as i64 - target as i64 ) . abs( ) < eps as i64 ,
You can’t perform that action at this time.
0 commit comments