Skip to content

Commit

Permalink
chore: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wangminqi committed Jan 3, 2025
1 parent db6b60e commit 11fb7d1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions parachain/runtime/litentry/src/migration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ use pallet_scheduler::Agenda;
use sp_std::marker::PhantomData;
#[cfg(feature = "try-runtime")]
use sp_std::vec::Vec;

extern crate alloc;
use alloc::collections::btree_map::BTreeMap;

pub type Migrations<Runtime> = (
// Scheduler V0 => V4
Expand Down Expand Up @@ -167,7 +169,6 @@ where

/// The original data layout of the preimage pallet without a specific version number.
mod preimage_helper {
use alloc::collections::btree_map::BTreeMap;
use frame_support::{pallet_prelude::*, storage_alias, traits::Currency};

type BalanceOf<T> = <<T as pallet_preimage::Config>::Currency as Currency<
Expand Down Expand Up @@ -220,13 +221,12 @@ where
}

fn on_runtime_upgrade() -> frame_support::weights::Weight {
use alloc::collections::btree_map::BTreeMap;
// Remove preimage correpted storage
// TODO: Very Weak safety
let mut weight = T::DbWeight::get().reads(1);
if StorageVersion::get::<pallet_preimage::Pallet<T>>() != 0 {
log::warn!(
target: TARGET,
target: PREIMAGE_LOG_TARGET,
"skipping MovePreimagesIntoBuckets: executed on wrong storage version.\
Expected version 0"
);
Expand Down

0 comments on commit 11fb7d1

Please sign in to comment.