Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 8 additions & 2 deletions pallets/subtensor/src/migrations/migrate_subnet_volume.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub fn migrate_subnet_volume<T: Config>() -> Weight {
let migration_name = b"migrate_subnet_volume".to_vec();

// Initialize the weight with one read operation.
let weight = T::DbWeight::get().reads(1);
let mut weight = T::DbWeight::get().reads(1);

// Check if the migration has already run
if HasMigrationRun::<T>::get(&migration_name) {
Expand All @@ -29,5 +29,11 @@ pub fn migrate_subnet_volume<T: Config>() -> Weight {
});

log::info!("Migrated {} entries in SubnetVolume", migrated);
weight.saturating_add(T::DbWeight::get().reads_writes(migrated, migrated))
weight = weight.saturating_add(T::DbWeight::get().reads_writes(migrated, migrated));

// Mark the migration as completed
HasMigrationRun::<T>::insert(&migration_name, true);
weight = weight.saturating_add(T::DbWeight::get().writes(1));

weight
}
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// `spec_version`, and `authoring_version` are the same between Wasm and native.
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
// the compatible custom types.
spec_version: 249,
spec_version: 250,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down
Loading