File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
pallets/subtensor/src/migrations Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ pub fn migrate_subnet_volume<T: Config>() -> Weight {
6
6
let migration_name = b"migrate_subnet_volume" . to_vec ( ) ;
7
7
8
8
// Initialize the weight with one read operation.
9
- let weight = T :: DbWeight :: get ( ) . reads ( 1 ) ;
9
+ let mut weight = T :: DbWeight :: get ( ) . reads ( 1 ) ;
10
10
11
11
// Check if the migration has already run
12
12
if HasMigrationRun :: < T > :: get ( & migration_name) {
@@ -29,5 +29,11 @@ pub fn migrate_subnet_volume<T: Config>() -> Weight {
29
29
} ) ;
30
30
31
31
log:: info!( "Migrated {} entries in SubnetVolume" , migrated) ;
32
- weight. saturating_add ( T :: DbWeight :: get ( ) . reads_writes ( migrated, migrated) )
32
+ weight = weight. saturating_add ( T :: DbWeight :: get ( ) . reads_writes ( migrated, migrated) ) ;
33
+
34
+ // Mark the migration as completed
35
+ HasMigrationRun :: < T > :: insert ( & migration_name, true ) ;
36
+ weight = weight. saturating_add ( T :: DbWeight :: get ( ) . writes ( 1 ) ) ;
37
+
38
+ weight
33
39
}
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
205
205
// `spec_version`, and `authoring_version` are the same between Wasm and native.
206
206
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
207
207
// the compatible custom types.
208
- spec_version : 249 ,
208
+ spec_version : 250 ,
209
209
impl_version : 1 ,
210
210
apis : RUNTIME_API_VERSIONS ,
211
211
transaction_version : 1 ,
You can’t perform that action at this time.
0 commit comments