Skip to content

Commit 1615fd7

Browse files
committed
Merge remote-tracking branch 'origin/hotfix/sn-to-emit-to' into testnet
2 parents 69fb210 + d968a93 commit 1615fd7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pallets/subtensor/src/tests/migration.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)