@@ -14,8 +14,8 @@ use frame_system::Config;
14
14
use sp_core:: { crypto:: Ss58Codec , H256 , U256 } ;
15
15
use sp_io:: hashing:: twox_128;
16
16
use sp_runtime:: traits:: Zero ;
17
- use substrate_fixed:: types:: I96F32 ;
18
17
use substrate_fixed:: types:: extra:: U2 ;
18
+ use substrate_fixed:: types:: I96F32 ;
19
19
20
20
#[ allow( clippy:: arithmetic_side_effects) ]
21
21
fn close ( value : u64 , target : u64 , eps : u64 ) {
@@ -99,7 +99,6 @@ fn test_migration_delete_subnet_21() {
99
99
} )
100
100
}
101
101
102
-
103
102
fn run_migration_and_check ( migration_name : & ' static str ) -> frame_support:: weights:: Weight {
104
103
// Execute the migration and store its weight
105
104
let weight: frame_support:: weights:: Weight =
@@ -230,9 +229,9 @@ fn test_migrate_rao() {
230
229
SubnetLocked :: < Test > :: insert ( netuid_1, lock_amount) ;
231
230
232
231
// Add some initial stake
233
- EmissionValues :: < Test > :: insert ( netuid_1, 1_000_000_000 ) ;
234
- EmissionValues :: < Test > :: insert ( netuid_2, 2_000_000_000 ) ;
235
- EmissionValues :: < Test > :: insert ( netuid_3, 3_000_000_000 ) ;
232
+ EmissionValues :: < Test > :: insert ( netuid_1, 1_000_000_000 ) ;
233
+ EmissionValues :: < Test > :: insert ( netuid_2, 2_000_000_000 ) ;
234
+ EmissionValues :: < Test > :: insert ( netuid_3, 3_000_000_000 ) ;
236
235
237
236
Owner :: < Test > :: insert ( hotkey1, coldkey1) ;
238
237
Owner :: < Test > :: insert ( hotkey2, coldkey2) ;
@@ -373,9 +372,21 @@ fn test_migrate_rao() {
373
372
// Run the coinbase
374
373
let emission: u64 = 1_000_000_000 ;
375
374
SubtensorModule :: run_coinbase ( I96F32 :: from_num ( emission) ) ;
376
- close ( SubnetTaoInEmission :: < Test > :: get ( netuid_1) , emission/6 , 100 ) ;
377
- close ( SubnetTaoInEmission :: < Test > :: get ( netuid_2) , 2 * ( emission/6 ) , 100 ) ;
378
- close ( SubnetTaoInEmission :: < Test > :: get ( netuid_3) , 3 * ( emission/6 ) , 100 ) ;
375
+ close (
376
+ SubnetTaoInEmission :: < Test > :: get ( netuid_1) ,
377
+ emission / 6 ,
378
+ 100 ,
379
+ ) ;
380
+ close (
381
+ SubnetTaoInEmission :: < Test > :: get ( netuid_2) ,
382
+ 2 * ( emission / 6 ) ,
383
+ 100 ,
384
+ ) ;
385
+ close (
386
+ SubnetTaoInEmission :: < Test > :: get ( netuid_3) ,
387
+ 3 * ( emission / 6 ) ,
388
+ 100 ,
389
+ ) ;
379
390
} ) ;
380
391
}
381
392
0 commit comments