Skip to content

Commit

Permalink
chore: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wangminqi committed Jan 14, 2025
1 parent 7008b12 commit 4fa227d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions parachain/runtime/litentry/src/migration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,10 @@ where
"StorageVersion".as_bytes(),
));

// Set storage version to `4`.
StorageVersion::new(4).put::<pallet_democracy::Pallet<T>>();
// Set storage version to `1`.
StorageVersion::new(1).put::<pallet_democracy::Pallet<T>>();

log::info!(target: DEMOCRACY_LOG_TARGET, "Storage to version 4");
log::info!(target: DEMOCRACY_LOG_TARGET, "Storage to version 1");
T::DbWeight::get().reads_writes(1, 3)
} else {
log::info!(
Expand All @@ -348,7 +348,7 @@ where

#[cfg(feature = "try-runtime")]
fn post_upgrade(_state: Vec<u8>) -> Result<(), sp_runtime::DispatchError> {
ensure!(StorageVersion::get::<pallet_democracy::Pallet<T>>() == 4, "Must upgrade");
ensure!(StorageVersion::get::<pallet_democracy::Pallet<T>>() == 1, "Must upgrade");
Ok(())
}
}
Expand Down

0 comments on commit 4fa227d

Please sign in to comment.