* Put type constraint at the end

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix rust features

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use new OnRuntimeUpgrade hooks

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use new OnRuntimeUpgrade hooks

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2022-09-19 15:12:29 +02:00
committed by GitHub
parent 0d2adf1fa1
commit d4b82c7706
4 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"sp-core",
"sp-io",
"pallet-balances",
"pallet-balances/runtime-benchmarks",
"sp-tracing",
"frame-election-provider-support/runtime-benchmarks",
]
+1
View File
@@ -74,6 +74,7 @@ runtime-benchmarks = [
"frame-election-provider-support/runtime-benchmarks",
"rand_chacha",
"sp-staking/runtime-benchmarks",
"pallet-bags-list/runtime-benchmarks",
]
try-runtime = ["frame-support/try-runtime"]
fuzz = [
+3 -3
View File
@@ -34,7 +34,7 @@ pub mod v11 {
for MigrateToV11<T, P, N>
{
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
fn pre_upgrade() -> Result<Vec<u8>, &'static str> {
frame_support::ensure!(
StorageVersion::<T>::get() == crate::Releases::V10_0_0,
"must upgrade linearly"
@@ -46,7 +46,7 @@ pub mod v11 {
"no data for the old pallet name has been detected"
);
Ok(())
Ok(Default::default())
}
/// Migrate the entire storage of this pallet to a new prefix.
@@ -81,7 +81,7 @@ pub mod v11 {
}
#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
fn post_upgrade(_state: Vec<u8>) -> Result<(), &'static str> {
frame_support::ensure!(
StorageVersion::<T>::get() == crate::Releases::V11_0_0,
"wrong version after the upgrade"
+1 -1
View File
@@ -110,9 +110,9 @@ pub mod pallet {
/// Standard collection creation is only allowed if the origin attempting it and the
/// collection are in this set.
type CreateOrigin: EnsureOriginWithArg<
Success = Self::AccountId,
Self::Origin,
Self::CollectionId,
Success = Self::AccountId,
>;
/// Locker trait to enable Locking mechanism downstream.