diff --git a/pallets/subtensor/src/migration.rs b/pallets/subtensor/src/migration.rs index 400030450..35b3c4260 100644 --- a/pallets/subtensor/src/migration.rs +++ b/pallets/subtensor/src/migration.rs @@ -565,23 +565,23 @@ pub fn migrate_populate_staking_hotkeys() -> Weight { if stake > 0 { let mut hotkeys = StakingHotkeys::::get(&coldkey); storage_reads = storage_reads.saturating_add(1); // Read from StakingHotkeys storage - + // Add the hotkey if it's not already in the vector if !hotkeys.contains(&hotkey) { hotkeys.push(hotkey); keys_touched = keys_touched.saturating_add(1); - + // Update longest hotkey vector info if longest_hotkey_vector < hotkeys.len() { longest_hotkey_vector = hotkeys.len(); longest_coldkey = Some(coldkey.clone()); } - + // Update the StakingHotkeys storage StakingHotkeys::::insert(&coldkey, hotkeys); storage_writes = storage_writes.saturating_add(1); // Write to StakingHotkeys storage } - + // Accrue weight for reads and writes weight = weight.saturating_add(T::DbWeight::get().reads_writes(2, 1)); } @@ -603,4 +603,3 @@ pub fn migrate_populate_staking_hotkeys() -> Weight { Weight::zero() } } - diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 71b506247..45096d33b 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -139,7 +139,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: 159, + spec_version: 160, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -294,7 +294,7 @@ parameter_types! { pub const RootEnterDuration: BlockNumber = 5 * 60 * 24; // 24 hours - pub const RootExtendDuration: BlockNumber = 5 * 60 * 3; // 3 hours + pub const RootExtendDuration: BlockNumber = 5 * 60 * 12; // 12 hours pub const DisallowPermissionlessEntering: Option = None; pub const DisallowPermissionlessExtending: Option = None;