@@ -2,7 +2,7 @@ use super::*;
2
2
use crate :: HasMigrationRun ;
3
3
use frame_support:: { traits:: Get , weights:: Weight } ;
4
4
use scale_info:: prelude:: string:: String ;
5
- use sp_io:: { KillStorageResult , hashing:: twox_128, storage:: clear_prefix} ;
5
+ use sp_io:: { KillStorageResult , hashing:: twox_128, storage:: { clear , clear_prefix} } ;
6
6
7
7
fn remove_prefix < T : Config > ( old_map : & str , weight : & mut Weight ) {
8
8
let mut prefix = Vec :: new ( ) ;
@@ -28,8 +28,8 @@ fn remove_prefix<T: Config>(old_map: &str, weight: &mut Weight) {
28
28
* weight = ( * weight) . saturating_add ( T :: DbWeight :: get ( ) . writes ( removed_entries_count) ) ;
29
29
}
30
30
31
- pub fn migrate_remove_unused_maps < T : Config > ( ) -> Weight {
32
- let migration_name = b"migrate_remove_unused_maps " . to_vec ( ) ;
31
+ pub fn migrate_remove_unused_maps_and_values < T : Config > ( ) -> Weight {
32
+ let migration_name = b"migrate_remove_unused_maps_and_values " . to_vec ( ) ;
33
33
let mut weight = T :: DbWeight :: get ( ) . reads ( 1 ) ;
34
34
35
35
if HasMigrationRun :: < T > :: get ( & migration_name) {
@@ -51,6 +51,9 @@ pub fn migrate_remove_unused_maps<T: Config>() -> Weight {
51
51
// Remove NetworkMaxStake
52
52
remove_prefix :: < T > ( "NetworkMaxStake" , & mut weight) ;
53
53
54
+ // Remove SubnetLimit
55
+ clear ( b"SubtensorModule::SubnetLimit" ) ;
56
+
54
57
// Mark Migration as Completed
55
58
HasMigrationRun :: < T > :: insert ( & migration_name, true ) ;
56
59
weight = weight. saturating_add ( T :: DbWeight :: get ( ) . writes ( 1 ) ) ;
0 commit comments