Skip to content

Commit

Permalink
Merge pull request #372 from opentensor/fix/migration_order
Browse files Browse the repository at this point in the history
Fix migration order, comment on_runtime_upgrade
  • Loading branch information
distributedstatemachine committed Apr 30, 2024
2 parents fe5c89f + dc26ca2 commit 002633d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pallets/subtensor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1204,14 +1204,21 @@ pub mod pallet {
"feabaafee293d3b76dae304e2f9d885f77d2b17adab9e17e921b321eccd61c77"
];
weight = weight
// Initializes storage version (to 1)
.saturating_add(migration::migrate_to_v1_separate_emission::<T>())
// Storage version v1 -> v2
.saturating_add(migration::migrate_to_v2_fixed_total_stake::<T>())
// Doesn't check storage version. TODO: Remove after upgrade
.saturating_add(migration::migrate_create_root_network::<T>())
// Storage version v2 -> v3
.saturating_add(migration::migrate_transfer_ownership_to_foundation::<T>(
hex,
))
.saturating_add(migration::migrate_delete_subnet_3::<T>())
// Storage version v3 -> v4
.saturating_add(migration::migrate_delete_subnet_21::<T>())
// Storage version v4 -> v5
.saturating_add(migration::migrate_delete_subnet_3::<T>())
// Doesn't check storage version. TODO: Remove after upgrade
.saturating_add(migration::migration5_total_issuance::<T>(false));

weight
Expand Down

0 comments on commit 002633d

Please sign in to comment.