mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 16:11:05 +00:00
Companion for substrate#9878 (#3949)
* Companion for substrate#9878 Signed-off-by: koushiro <koushiro.cqx@gmail.com> * update substrate Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
@@ -81,7 +81,7 @@ pub use pallet_balances::Call as BalancesCall;
|
||||
use polkadot_parachain::primitives::Id as ParaId;
|
||||
|
||||
use constants::{currency::*, fee::*, time::*};
|
||||
use frame_support::traits::InstanceFilter;
|
||||
use frame_support::traits::{InstanceFilter, OnRuntimeUpgrade};
|
||||
use xcm::latest::prelude::*;
|
||||
use xcm_builder::{
|
||||
AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, BackingToPlurality,
|
||||
@@ -158,11 +158,32 @@ pub type Executive = frame_executive::Executive<
|
||||
frame_system::ChainContext<Runtime>,
|
||||
Runtime,
|
||||
AllPallets,
|
||||
(),
|
||||
(SessionHistoricalModulePrefixMigration,),
|
||||
>;
|
||||
/// The payload being signed in transactions.
|
||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||
|
||||
/// Migrate session-historical from `Session` to the new pallet prefix `Historical`
|
||||
pub struct SessionHistoricalModulePrefixMigration;
|
||||
|
||||
impl OnRuntimeUpgrade for SessionHistoricalModulePrefixMigration {
|
||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
||||
pallet_session::migrations::v1::migrate::<Runtime, Historical>()
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn pre_upgrade() -> Result<(), &'static str> {
|
||||
pallet_session::migrations::v1::pre_migrate::<Runtime, Historical>();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
fn post_upgrade() -> Result<(), &'static str> {
|
||||
pallet_session::migrations::v1::post_migrate::<Runtime, Historical>();
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl_opaque_keys! {
|
||||
pub struct SessionKeys {
|
||||
pub grandpa: Grandpa,
|
||||
|
||||
Reference in New Issue
Block a user