mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
Nomination Pools migration v5: RewardPool fix (#6957)
* pools migration v5 * Allow deprecated Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Keep old migrations around Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * update lockfile for {"substrate"} * use master Cargo.lock * revert Cargo.lock master * clippy: remove unused parentheses Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix parachain config migration Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Make tests work Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+183
-183
File diff suppressed because it is too large
Load Diff
@@ -1475,12 +1475,17 @@ impl Get<Perbill> for NominationPoolsMigrationV4OldPallet {
|
|||||||
|
|
||||||
/// All migrations that will run on the next runtime upgrade.
|
/// All migrations that will run on the next runtime upgrade.
|
||||||
///
|
///
|
||||||
/// Should be cleared after every release.
|
/// This contains the combined migrations of the last 10 releases. It allows to skip runtime
|
||||||
|
/// upgrades in case governance decides to do so.
|
||||||
|
#[allow(deprecated)]
|
||||||
pub type Migrations = (
|
pub type Migrations = (
|
||||||
|
// 0.9.40
|
||||||
pallet_nomination_pools::migration::v4::MigrateToV4<
|
pallet_nomination_pools::migration::v4::MigrateToV4<
|
||||||
Runtime,
|
Runtime,
|
||||||
NominationPoolsMigrationV4OldPallet,
|
NominationPoolsMigrationV4OldPallet,
|
||||||
>,
|
>,
|
||||||
|
// Unreleased - add new migrations here:
|
||||||
|
pallet_nomination_pools::migration::v5::MigrateToV5<Runtime>,
|
||||||
parachains_configuration::migration::v5::MigrateToV5<Runtime>,
|
parachains_configuration::migration::v5::MigrateToV5<Runtime>,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ pub mod v5 {
|
|||||||
fn pre_upgrade() -> Result<Vec<u8>, &'static str> {
|
fn pre_upgrade() -> Result<Vec<u8>, &'static str> {
|
||||||
log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade()");
|
log::trace!(target: crate::configuration::LOG_TARGET, "Running pre_upgrade()");
|
||||||
|
|
||||||
ensure!(StorageVersion::get::<Pallet<T>>() == 3, "The migration requires version 3");
|
ensure!(StorageVersion::get::<Pallet<T>>() == 4, "The migration requires version 4");
|
||||||
Ok(Vec::new())
|
Ok(Vec::new())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1412,12 +1412,16 @@ impl Get<Perbill> for NominationPoolsMigrationV4OldPallet {
|
|||||||
|
|
||||||
/// All migrations that will run on the next runtime upgrade.
|
/// All migrations that will run on the next runtime upgrade.
|
||||||
///
|
///
|
||||||
/// Should be cleared after every release.
|
/// This contains the combined migrations of the last 10 releases. It allows to skip runtime upgrades in case governance decides to do so.
|
||||||
|
#[allow(deprecated)]
|
||||||
pub type Migrations = (
|
pub type Migrations = (
|
||||||
|
// 0.9.40
|
||||||
pallet_nomination_pools::migration::v4::MigrateToV4<
|
pallet_nomination_pools::migration::v4::MigrateToV4<
|
||||||
Runtime,
|
Runtime,
|
||||||
NominationPoolsMigrationV4OldPallet,
|
NominationPoolsMigrationV4OldPallet,
|
||||||
>,
|
>,
|
||||||
|
// Unreleased - add new migrations here:
|
||||||
|
pallet_nomination_pools::migration::v5::MigrateToV5<Runtime>,
|
||||||
parachains_configuration::migration::v5::MigrateToV5<Runtime>,
|
parachains_configuration::migration::v5::MigrateToV5<Runtime>,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -1493,7 +1493,8 @@ pub type UncheckedExtrinsic =
|
|||||||
|
|
||||||
/// All migrations that will run on the next runtime upgrade.
|
/// All migrations that will run on the next runtime upgrade.
|
||||||
///
|
///
|
||||||
/// Should be cleared after every release.
|
/// This contains the combined migrations of the last 10 releases. It allows to skip runtime
|
||||||
|
/// upgrades in case governance decides to do so.
|
||||||
pub type Migrations = parachains_configuration::migration::v5::MigrateToV5<Runtime>;
|
pub type Migrations = parachains_configuration::migration::v5::MigrateToV5<Runtime>;
|
||||||
|
|
||||||
/// Executive: handles dispatch to the various modules.
|
/// Executive: handles dispatch to the various modules.
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ impl pallet_indices::Config for Runtime {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub storage ExistentialDeposit: Balance = 1 * CENTS;
|
pub const ExistentialDeposit: Balance = 1 * CENTS;
|
||||||
pub storage MaxLocks: u32 = 50;
|
pub storage MaxLocks: u32 = 50;
|
||||||
pub const MaxReserves: u32 = 50;
|
pub const MaxReserves: u32 = 50;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1207,13 +1207,18 @@ impl Get<Perbill> for NominationPoolsMigrationV4OldPallet {
|
|||||||
|
|
||||||
/// All migrations that will run on the next runtime upgrade.
|
/// All migrations that will run on the next runtime upgrade.
|
||||||
///
|
///
|
||||||
/// Should be cleared after every release.
|
/// This contains the combined migrations of the last 10 releases. It allows to skip runtime
|
||||||
|
/// upgrades in case governance decides to do so.
|
||||||
|
#[allow(deprecated)]
|
||||||
pub type Migrations = (
|
pub type Migrations = (
|
||||||
|
// 0.9.40
|
||||||
clean_state_migration::CleanMigrate,
|
clean_state_migration::CleanMigrate,
|
||||||
pallet_nomination_pools::migration::v4::MigrateToV4<
|
pallet_nomination_pools::migration::v4::MigrateToV4<
|
||||||
Runtime,
|
Runtime,
|
||||||
NominationPoolsMigrationV4OldPallet,
|
NominationPoolsMigrationV4OldPallet,
|
||||||
>,
|
>,
|
||||||
|
// Unreleased - add new migrations here:
|
||||||
|
pallet_nomination_pools::migration::v5::MigrateToV5<Runtime>,
|
||||||
parachains_configuration::migration::v5::MigrateToV5<Runtime>,
|
parachains_configuration::migration::v5::MigrateToV5<Runtime>,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user