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> {
476
476
477
477
// Get the hotkey's stake including weight
478
478
let root_stake: I96F32 = I96F32 :: from_num ( Self :: get_stake_for_hotkey_on_subnet (
479
- & hotkey,
479
+ hotkey,
480
480
Self :: get_root_netuid ( ) ,
481
481
) ) ;
482
482
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) ) ;
484
484
485
485
// Calculate the
486
486
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> {
106
106
107
107
// Step 1: Get stake of hotkey (neuron)
108
108
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) ) ;
110
110
log:: trace!( "alpha_stake: {:?}" , alpha_stake) ;
111
111
112
112
// 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 ) ) ;
114
114
log:: trace!( "tao_stake: {:?}" , tao_stake) ;
115
115
116
116
// 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;
7
7
use substrate_fixed:: types:: I64F64 ;
8
8
use substrate_fixed:: types:: I96F32 ;
9
9
10
+ #[ allow( clippy:: arithmetic_side_effects) ]
10
11
fn close ( value : u64 , target : u64 , eps : u64 ) {
11
12
assert ! (
12
13
( value as i64 - target as i64 ) . abs( ) < eps as i64 ,
You can’t perform that action at this time.
0 commit comments