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 {
66 let migration_name = b"migrate_subnet_volume" . to_vec ( ) ;
77
88 // Initialize the weight with one read operation.
9- let weight = T :: DbWeight :: get ( ) . reads ( 1 ) ;
9+ let mut weight = T :: DbWeight :: get ( ) . reads ( 1 ) ;
1010
1111 // Check if the migration has already run
1212 if HasMigrationRun :: < T > :: get ( & migration_name) {
@@ -29,5 +29,11 @@ pub fn migrate_subnet_volume<T: Config>() -> Weight {
2929 } ) ;
3030
3131 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
3339}
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
205205 // `spec_version`, and `authoring_version` are the same between Wasm and native.
206206 // This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
207207 // the compatible custom types.
208- spec_version : 249 ,
208+ spec_version : 250 ,
209209 impl_version : 1 ,
210210 apis : RUNTIME_API_VERSIONS ,
211211 transaction_version : 1 ,
You can’t perform that action at this time.
0 commit comments