Skip to content

Commit

Permalink
Avoid deprecated AllPalletsReversedWithSystemFirst
Browse files Browse the repository at this point in the history
  • Loading branch information
notlesh committed Sep 29, 2022
1 parent 6751963 commit dd09d52
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
14 changes: 7 additions & 7 deletions runtime/moonbase/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ pub struct MaintenanceHooks;

impl OnInitialize<BlockNumber> for MaintenanceHooks {
fn on_initialize(n: BlockNumber) -> Weight {
AllPalletsReversedWithSystemFirst::on_initialize(n)
AllPalletsWithSystem::on_initialize(n)
}
}

Expand All @@ -1066,28 +1066,28 @@ impl OnIdle<BlockNumber> for MaintenanceHooks {

impl OnRuntimeUpgrade for MaintenanceHooks {
fn on_runtime_upgrade() -> Weight {
AllPalletsReversedWithSystemFirst::on_runtime_upgrade()
AllPalletsWithSystem::on_runtime_upgrade()
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
AllPalletsReversedWithSystemFirst::pre_upgrade()
AllPalletsWithSystem::pre_upgrade()
}

#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
AllPalletsReversedWithSystemFirst::post_upgrade()
AllPalletsWithSystem::post_upgrade()
}
}

impl OnFinalize<BlockNumber> for MaintenanceHooks {
fn on_finalize(n: BlockNumber) {
AllPalletsReversedWithSystemFirst::on_finalize(n)
AllPalletsWithSystem::on_finalize(n)
}
}

impl OffchainWorker<BlockNumber> for MaintenanceHooks {
fn offchain_worker(n: BlockNumber) {
AllPalletsReversedWithSystemFirst::offchain_worker(n)
AllPalletsWithSystem::offchain_worker(n)
}
}

Expand All @@ -1102,7 +1102,7 @@ impl pallet_maintenance_mode::Config for Runtime {
type MaintenanceDmpHandler = MaintenanceDmpHandler;
// We use AllPalletsReversedWithSystemFirst because we dont want to change the hooks in normal
// operation
type NormalExecutiveHooks = AllPalletsReversedWithSystemFirst;
type NormalExecutiveHooks = AllPalletsWithSystem;
type MaintenanceExecutiveHooks = MaintenanceHooks;
}

Expand Down
14 changes: 7 additions & 7 deletions runtime/moonbeam/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ pub struct MaintenanceHooks;

impl OnInitialize<BlockNumber> for MaintenanceHooks {
fn on_initialize(n: BlockNumber) -> Weight {
AllPalletsReversedWithSystemFirst::on_initialize(n)
AllPalletsWithSystem::on_initialize(n)
}
}

Expand All @@ -1033,28 +1033,28 @@ impl OnIdle<BlockNumber> for MaintenanceHooks {

impl OnRuntimeUpgrade for MaintenanceHooks {
fn on_runtime_upgrade() -> Weight {
AllPalletsReversedWithSystemFirst::on_runtime_upgrade()
AllPalletsWithSystem::on_runtime_upgrade()
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
AllPalletsReversedWithSystemFirst::pre_upgrade()
AllPalletsWithSystem::pre_upgrade()
}

#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
AllPalletsReversedWithSystemFirst::post_upgrade()
AllPalletsWithSystem::post_upgrade()
}
}

impl OnFinalize<BlockNumber> for MaintenanceHooks {
fn on_finalize(n: BlockNumber) {
AllPalletsReversedWithSystemFirst::on_finalize(n)
AllPalletsWithSystem::on_finalize(n)
}
}

impl OffchainWorker<BlockNumber> for MaintenanceHooks {
fn offchain_worker(n: BlockNumber) {
AllPalletsReversedWithSystemFirst::offchain_worker(n)
AllPalletsWithSystem::offchain_worker(n)
}
}

Expand All @@ -1069,7 +1069,7 @@ impl pallet_maintenance_mode::Config for Runtime {
type MaintenanceDmpHandler = MaintenanceDmpHandler;
// We use AllPalletsReversedWithSystemFirst because we dont want to change the hooks in normal
// operation
type NormalExecutiveHooks = AllPalletsReversedWithSystemFirst;
type NormalExecutiveHooks = AllPalletsWithSystem;
type MaintenanceExecutiveHooks = MaintenanceHooks;
}

Expand Down
14 changes: 7 additions & 7 deletions runtime/moonriver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ pub struct MaintenanceHooks;

impl OnInitialize<BlockNumber> for MaintenanceHooks {
fn on_initialize(n: BlockNumber) -> Weight {
AllPalletsReversedWithSystemFirst::on_initialize(n)
AllPalletsWithSystem::on_initialize(n)
}
}

Expand All @@ -1034,28 +1034,28 @@ impl OnIdle<BlockNumber> for MaintenanceHooks {

impl OnRuntimeUpgrade for MaintenanceHooks {
fn on_runtime_upgrade() -> Weight {
AllPalletsReversedWithSystemFirst::on_runtime_upgrade()
AllPalletsWithSystem::on_runtime_upgrade()
}
#[cfg(feature = "try-runtime")]
fn pre_upgrade() -> Result<(), &'static str> {
AllPalletsReversedWithSystemFirst::pre_upgrade()
AllPalletsWithSystem::pre_upgrade()
}

#[cfg(feature = "try-runtime")]
fn post_upgrade() -> Result<(), &'static str> {
AllPalletsReversedWithSystemFirst::post_upgrade()
AllPalletsWithSystem::post_upgrade()
}
}

impl OnFinalize<BlockNumber> for MaintenanceHooks {
fn on_finalize(n: BlockNumber) {
AllPalletsReversedWithSystemFirst::on_finalize(n)
AllPalletsWithSystem::on_finalize(n)
}
}

impl OffchainWorker<BlockNumber> for MaintenanceHooks {
fn offchain_worker(n: BlockNumber) {
AllPalletsReversedWithSystemFirst::offchain_worker(n)
AllPalletsWithSystem::offchain_worker(n)
}
}

Expand All @@ -1070,7 +1070,7 @@ impl pallet_maintenance_mode::Config for Runtime {
type MaintenanceDmpHandler = MaintenanceDmpHandler;
// We use AllPalletsReversedWithSystemFirst because we dont want to change the hooks in normal
// operation
type NormalExecutiveHooks = AllPalletsReversedWithSystemFirst;
type NormalExecutiveHooks = AllPalletsWithSystem;
type MaintenanceExecutiveHooks = MaintenanceHooks;
}

Expand Down

0 comments on commit dd09d52

Please sign in to comment.