Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix migration order, comment on_runtime_upgrade #372

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pallets/subtensor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1203,14 +1203,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
distributedstatemachine marked this conversation as resolved.
Show resolved Hide resolved
.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
Loading