Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add prdoc and fix clippy
  • Loading branch information
dastansam committed Mar 25, 2024
commit a13f875774613ab664fe8ee6252f7c22d7db1352
24 changes: 24 additions & 0 deletions prdoc/pr_3834.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json

title: "migrations: prevent accidentally using inner unversioned migration instead of `VersionedMigration`"

doc:
- audience: Runtime Dev
description: |
Currently, it is possible to accidentally use inner unversioned migration instead of `VersionedMigration`
since both implement `OnRuntimeUpgrade`. With this change, we prevent this by bounding `Inner`
to new trait `UncheckedOnRuntimeUpgrade`, which has the same interface as `OnRuntimeUpgrade`. It also
improves code readability by making it clear that `Inner` is not intended to be used directly.

crates:
- name: "pallet-example-single-block-migrations"
- name: "pallet-staging-xcm"
- name: "pallet-grandpa"
- name: "pallet-identity"
- name: "pallet-nomination-pools"
- name: "pallet-society"
- name: "frame-support"
- name: "pallet-uniques"
- name: "polkadot-runtime-parachains"
- name: "polkadot-runtime-common"
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

use frame_support::{
storage_alias,
traits::{Get, OnRuntimeUpgrade, UncheckedOnRuntimeUpgrade},
traits::{Get, UncheckedOnRuntimeUpgrade},
};

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