mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 10:07:56 +00:00
Bring back runtime upgrade test (#525)
This brings back the runtime upgrade test and also updates Substrate & Polkadot.
This commit is contained in:
@@ -253,15 +253,6 @@ impl cumulus_pallet_parachain_system::Config for Runtime {
|
||||
|
||||
parameter_types! {
|
||||
pub storage ParachainId: cumulus_primitives_core::ParaId = 100.into();
|
||||
pub storage UpgradeDetection: bool = false;
|
||||
}
|
||||
|
||||
pub struct UpgradeDetectionOnRuntimeUpgrade;
|
||||
impl frame_support::traits::OnRuntimeUpgrade for UpgradeDetectionOnRuntimeUpgrade {
|
||||
fn on_runtime_upgrade() -> u64 {
|
||||
UpgradeDetection::set(&true);
|
||||
0
|
||||
}
|
||||
}
|
||||
|
||||
construct_runtime! {
|
||||
@@ -326,7 +317,6 @@ pub type Executive = frame_executive::Executive<
|
||||
frame_system::ChainContext<Runtime>,
|
||||
Runtime,
|
||||
AllPallets,
|
||||
UpgradeDetectionOnRuntimeUpgrade,
|
||||
>;
|
||||
/// The payload being signed in transactions.
|
||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||
@@ -336,10 +326,6 @@ decl_runtime_apis! {
|
||||
/// Returns the last timestamp of a runtime.
|
||||
fn get_last_timestamp() -> u64;
|
||||
}
|
||||
pub trait GetUpgradeDetection {
|
||||
/// Returns `true` if the runtime has been upgraded at least once.
|
||||
fn has_upgraded() -> bool;
|
||||
}
|
||||
}
|
||||
|
||||
impl_runtime_apis! {
|
||||
@@ -417,12 +403,6 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl crate::GetUpgradeDetection<Block> for Runtime {
|
||||
fn has_upgraded() -> bool {
|
||||
UpgradeDetection::get()
|
||||
}
|
||||
}
|
||||
|
||||
impl cumulus_primitives_core::CollectCollationInfo<Block> for Runtime {
|
||||
fn collect_collation_info() -> cumulus_primitives_core::CollationInfo {
|
||||
ParachainSystem::collect_collation_info()
|
||||
|
||||
Reference in New Issue
Block a user