File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
pallets/subtensor/src/tests Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -2695,18 +2695,22 @@ fn test_migrate_reset_unactive_sn_idempotence() {
26952695 . copied ( )
26962696 . collect :: < Vec < _ > > ( ) ;
26972697
2698+ // Run total issuance migration *before* running the migration.
2699+ crate :: migrations:: migrate_init_total_issuance:: migrate_init_total_issuance :: < Test > ( ) ;
2700+
26982701 // Run the migration
26992702 let w = crate :: migrations:: migrate_reset_unactive_sn:: migrate_reset_unactive_sn :: < Test > ( ) ;
27002703 assert ! ( !w. is_zero( ) , "weight must be non-zero" ) ;
27012704
2705+ // Store the values after running the migration
27022706 let mut subnet_tao_before = BTreeMap :: new ( ) ;
27032707 for netuid in & netuids {
27042708 subnet_tao_before. insert ( netuid, SubnetTAO :: < Test > :: get ( netuid) ) ;
27052709 }
27062710 let total_stake_before = TotalStake :: < Test > :: get ( ) ;
27072711 let total_issuance_before = TotalIssuance :: < Test > :: get ( ) ;
27082712
2709- // Run total issuance migration
2713+ // Run total issuance migration again, to make sure no changes happen from it.
27102714 crate :: migrations:: migrate_init_total_issuance:: migrate_init_total_issuance :: < Test > ( ) ;
27112715
27122716 // Verify that none of the values are different
You can’t perform that action at this time.
0 commit comments