Skip to content

Commit 8ef4430

Browse files
committed
remove clear_prefix call as it is not required
1 parent 076476e commit 8ef4430

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

runtime/common/src/migrations.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -627,20 +627,6 @@ where
627627

628628
log::info!("Migrating {:?} elements", migrated_count);
629629

630-
// Removing older entries with old location as key
631-
let mut removal_result = storage::unhashed::clear_prefix(
632-
&ForeignAssetToAssetId::<Runtime>::final_prefix(),
633-
None,
634-
None,
635-
);
636-
while removal_result.maybe_cursor.is_some() {
637-
removal_result = storage::unhashed::clear_prefix(
638-
&ForeignAssetToAssetId::<Runtime>::final_prefix(),
639-
None,
640-
removal_result.maybe_cursor.as_deref(),
641-
);
642-
}
643-
644630
// Write to the new storage with removed and added fields
645631
for (asset_id, old_location) in asset_id_to_foreign_asset_data {
646632
if let Ok(new_location) = Runtime::ForeignAsset::try_from(old_location) {
@@ -662,7 +648,6 @@ where
662648
Runtime::DbWeight::get()
663649
.reads(migrated_count as u64)
664650
.saturating_add(Runtime::DbWeight::get().writes(migrated_count as u64 + 3u64))
665-
.saturating_add(Runtime::DbWeight::get().writes(foreign_asset_to_asset_id_count as u64))
666651
}
667652

668653
#[cfg(feature = "try-runtime")]

0 commit comments

Comments
 (0)