diff --git a/pallets/subtensor/src/migrations/migrate_subnet_volume.rs b/pallets/subtensor/src/migrations/migrate_subnet_volume.rs index 46835877d9..cbf2007c3d 100644 --- a/pallets/subtensor/src/migrations/migrate_subnet_volume.rs +++ b/pallets/subtensor/src/migrations/migrate_subnet_volume.rs @@ -6,7 +6,7 @@ pub fn migrate_subnet_volume() -> 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::::get(&migration_name) { @@ -29,5 +29,11 @@ pub fn migrate_subnet_volume() -> 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::::insert(&migration_name, true); + weight = weight.saturating_add(T::DbWeight::get().writes(1)); + + weight } diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 2bd96a1e1a..0f362ada54 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -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,