File tree 2 files changed +3
-2
lines changed
pallets/subtensor/src/staking
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,8 @@ impl<T: Config> Pallet<T> {
59
59
pub fn update_moving_price ( netuid : u16 ) {
60
60
let alpha: I96F32 = SubnetMovingAlpha :: < T > :: get ( ) ;
61
61
let minus_alpha: I96F32 = I96F32 :: saturating_from_num ( 1.0 ) . saturating_sub ( alpha) ;
62
- let current_price: I96F32 = alpha. saturating_mul ( Self :: get_alpha_price ( netuid) ) ;
62
+ let current_price: I96F32 = alpha
63
+ . saturating_mul ( Self :: get_alpha_price ( netuid) . min ( I96F32 :: saturating_from_num ( 1.0 ) ) ) ;
63
64
let current_moving: I96F32 =
64
65
minus_alpha. saturating_mul ( Self :: get_moving_alpha_price ( netuid) ) ;
65
66
let new_moving: I96F32 = current_price. saturating_add ( current_moving) ;
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
229
229
// `spec_version`, and `authoring_version` are the same between Wasm and native.
230
230
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
231
231
// the compatible custom types.
232
- spec_version : 233 ,
232
+ spec_version : 234 ,
233
233
impl_version : 1 ,
234
234
apis : RUNTIME_API_VERSIONS ,
235
235
transaction_version : 1 ,
You can’t perform that action at this time.
0 commit comments