File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1382,9 +1382,11 @@ impl<T: Config> Pallet<T> {
13821382 ConsensusMode :: Auto => {
13831383 // Auto mode: Previous if bond_penalty == 1, otherwise Current
13841384 let bonds_penalty = Self :: get_float_bonds_penalty ( netuid) ;
1385- ( bonds_penalty == I32F32 :: from_num ( 1 ) )
1386- . then ( || Self :: get_previous_consensus_as_i32f32 ( netuid) )
1387- . unwrap_or_else ( || current_consensus. to_vec ( ) )
1385+ if bonds_penalty == I32F32 :: from_num ( 1 ) {
1386+ Self :: get_previous_consensus_as_i32f32 ( netuid)
1387+ } else {
1388+ current_consensus. to_vec ( )
1389+ }
13881390 }
13891391 }
13901392 }
Original file line number Diff line number Diff line change @@ -2647,7 +2647,7 @@ mod dispatches {
26472647 Weight :: from_parts( 10_000 , 0 )
26482648 . saturating_add( T :: DbWeight :: get( ) . reads( 2 ) )
26492649 . saturating_add( T :: DbWeight :: get( ) . writes( 1 ) ) ,
2650- DispatchClass :: Operational ,
2650+ DispatchClass :: Normal ,
26512651 Pays :: Yes
26522652 ) ) ]
26532653 pub fn set_liquid_alpha_consensus_mode (
You can’t perform that action at this time.
0 commit comments