File tree Expand file tree Collapse file tree 3 files changed +47
-363
lines changed Expand file tree Collapse file tree 3 files changed +47
-363
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ use alloc::string::String;
33use frame_support:: IterableStorageMap ;
44use frame_support:: { traits:: Get , weights:: Weight } ;
55use sp_runtime:: format;
6+ use substrate_fixed:: types:: I96F32 ;
67use substrate_fixed:: types:: U64F64 ;
78
89use super :: * ;
@@ -88,6 +89,12 @@ pub fn migrate_rao<T: Config>() -> Weight {
8889
8990 let remaining_lock = lock. saturating_sub ( pool_initial_tao) ;
9091 // Refund the owner for the remaining lock.
92+ SubnetMovingPrice :: < T > :: insert (
93+ netuid,
94+ I96F32 :: from_num ( EmissionValues :: < T > :: get ( netuid) )
95+ . checked_div ( I96F32 :: from_num ( 1_000_000_000 ) )
96+ . unwrap_or ( I96F32 :: from_num ( 0.0 ) ) ,
97+ ) ;
9198 Pallet :: < T > :: add_balance_to_coldkey_account ( & owner, remaining_lock) ;
9299 SubnetLocked :: < T > :: insert ( netuid, 0 ) ; // Clear lock amount.
93100 SubnetTAO :: < T > :: insert ( netuid, pool_initial_tao) ;
You can’t perform that action at this time.
0 commit comments