Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions runtime/acala/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2035,25 +2035,8 @@ pub type Executive = frame_executive::Executive<
Migrations,
>;

pub struct RemoveXTokensMigrationStatus<T>(frame_support::pallet_prelude::PhantomData<T>);

impl<T: frame_system::Config> frame_support::traits::OnRuntimeUpgrade for RemoveXTokensMigrationStatus<T> {
fn on_runtime_upgrade() -> Weight {
let key = frame_support::storage::storage_prefix(b"XTokens", b"MigrationStatus");
log::info!(
"key: {:?}, exists: {:?}",
key,
frame_support::storage::unhashed::exists(&key)
);

frame_support::storage::unhashed::kill(&key);

T::DbWeight::get().writes(1)
}
}

#[allow(unused_parens)]
type Migrations = (RemoveXTokensMigrationStatus<Runtime>);
type Migrations = ();

#[cfg(feature = "runtime-benchmarks")]
mod benches {
Expand Down
19 changes: 1 addition & 18 deletions runtime/karura/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2042,25 +2042,8 @@ pub type Executive = frame_executive::Executive<
Migrations,
>;

pub struct RemoveXTokensMigrationStatus<T>(frame_support::pallet_prelude::PhantomData<T>);

impl<T: frame_system::Config> frame_support::traits::OnRuntimeUpgrade for RemoveXTokensMigrationStatus<T> {
fn on_runtime_upgrade() -> Weight {
let key = frame_support::storage::storage_prefix(b"XTokens", b"MigrationStatus");
log::info!(
"key: {:?}, exists: {:?}",
key,
frame_support::storage::unhashed::exists(&key)
);

frame_support::storage::unhashed::kill(&key);

T::DbWeight::get().writes(1)
}
}

#[allow(unused_parens)]
type Migrations = (RemoveXTokensMigrationStatus<Runtime>);
type Migrations = ();

#[cfg(feature = "runtime-benchmarks")]
mod benches {
Expand Down