mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 15:11:02 +00:00
Companion for substrate#9711 (#3801)
* Companion for substrate#9711 Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Fix Signed-off-by: koushiro <koushiro.cqx@gmail.com> * update Substrate * cargo +nightly fmt Co-authored-by: parity-processbot <> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -1505,7 +1505,7 @@ pub type Executive = frame_executive::Executive<
|
||||
frame_system::ChainContext<Runtime>,
|
||||
Runtime,
|
||||
AllPallets,
|
||||
TechnicalMembershipStoragePrefixMigration,
|
||||
(TechnicalMembershipStoragePrefixMigration, MigrateTipsPalletPrefix),
|
||||
>;
|
||||
/// The payload being signed in the transactions.
|
||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||
@@ -1550,6 +1550,28 @@ impl OnRuntimeUpgrade for TechnicalMembershipStoragePrefixMigration {
|
||||
}
|
||||
}
|
||||
|
||||
const TIPS_OLD_PREFIX: &str = "Treasury";
|
||||
/// Migrate pallet-tips from `Treasury` to the new pallet prefix `Tips`
|
||||
pub struct MigrateTipsPalletPrefix;
|
||||
|
||||
impl OnRuntimeUpgrade for MigrateTipsPalletPrefix {
|
||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
||||
pallet_tips::migrations::v4::migrate::<Runtime, Tips, _>(TIPS_OLD_PREFIX)
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<(), &'static str> {
|
||||
pallet_tips::migrations::v4::pre_migrate::<Runtime, Tips, _>(TIPS_OLD_PREFIX);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade() -> Result<(), &'static str> {
|
||||
pallet_tips::migrations::v4::post_migrate::<Runtime, Tips, _>(TIPS_OLD_PREFIX);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "disable-runtime-api"))]
|
||||
sp_api::impl_runtime_apis! {
|
||||
impl sp_api::Core<Block> for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user