Skip to content

Commit

Permalink
Use assert_eq instead of ensure
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrylavrenov committed Nov 8, 2024
1 parent 33c8854 commit dd8d060
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/pallet-erc20-support/src/migrations/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ impl<T: Config<I>, I: 'static> OnRuntimeUpgrade for MigrationV0ToV1<T, I> {

#[cfg(feature = "try-runtime")]
fn post_upgrade(_state: Vec<u8>) -> Result<(), &'static str> {
ensure!(
<Pallet<T, I>>::on_chain_storage_version() == <Pallet<T, I>>::current_storage_version(),
"the current storage version and onchain storage version should be the same"
assert_eq!(
<Pallet<T, I>>::on_chain_storage_version(),
<Pallet<T, I>>::current_storage_version()
);
Ok(())
}
Expand Down

0 comments on commit dd8d060

Please sign in to comment.