mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +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:
@@ -51,7 +51,7 @@ use frame_support::{
|
||||
construct_runtime, match_type, parameter_types,
|
||||
traits::{
|
||||
Contains, Everything, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, Nothing,
|
||||
PrivilegeCmp,
|
||||
OnRuntimeUpgrade, PrivilegeCmp,
|
||||
},
|
||||
weights::Weight,
|
||||
PalletId, RuntimeDebug,
|
||||
@@ -1595,11 +1595,32 @@ pub type Executive = frame_executive::Executive<
|
||||
frame_system::ChainContext<Runtime>,
|
||||
Runtime,
|
||||
AllPallets,
|
||||
(),
|
||||
(SessionHistoricalPalletPrefixMigration,),
|
||||
>;
|
||||
/// The payload being signed in the transactions.
|
||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||
|
||||
/// Migrate session-historical from `Session` to the new pallet prefix `Historical`
|
||||
pub struct SessionHistoricalPalletPrefixMigration;
|
||||
|
||||
impl OnRuntimeUpgrade for SessionHistoricalPalletPrefixMigration {
|
||||
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(())
|
||||
}
|
||||
}
|
||||
|
||||
#[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