Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit ad6619d

Browse files
authored
Revert "Companion PR for Allow specify schedule dispatch origin #6387" (#1340)
1 parent 7826efe commit ad6619d

File tree

4 files changed

+4
-35
lines changed

4 files changed

+4
-35
lines changed

runtime/common/src/parachains.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ pub trait Trait: CreateSignedTransaction<Call<Self>> + attestations::Trait + ses
333333
}
334334

335335
/// Origin for the parachains module.
336-
#[derive(PartialEq, Eq, Clone, Encode, Decode)]
336+
#[derive(PartialEq, Eq, Clone)]
337337
#[cfg_attr(feature = "std", derive(Debug))]
338338
pub enum Origin {
339339
/// It comes from a parachain.

runtime/kusama/src/lib.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,8 @@ impl system::Trait for Runtime {
152152
impl scheduler::Trait for Runtime {
153153
type Event = Event;
154154
type Origin = Origin;
155-
type PalletsOrigin = OriginCaller;
156155
type Call = Call;
157156
type MaximumWeight = MaximumBlockWeight;
158-
type ScheduleOrigin = EnsureRoot<AccountId>;
159157
}
160158

161159
parameter_types! {
@@ -375,7 +373,6 @@ impl democracy::Trait for Runtime {
375373
type PreimageByteDeposit = PreimageByteDeposit;
376374
type Slash = Treasury;
377375
type Scheduler = Scheduler;
378-
type PalletsOrigin = OriginCaller;
379376
type MaxVotes = MaxVotes;
380377
type OperationalPreimageOrigin = collective::EnsureMember<AccountId, CouncilCollective>;
381378
}
@@ -892,14 +889,10 @@ impl proxy::Trait for Runtime {
892889
}
893890

894891
pub struct CustomOnRuntimeUpgrade;
895-
impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
892+
impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
896893
fn on_runtime_upgrade() -> frame_support::weights::Weight {
897894
treasury::Module::<Runtime>::migrate_retract_tip_for_tip_new();
898-
if scheduler::Module::<Runtime>::migrate_v1_to_t2() {
899-
<Runtime as system::Trait>::MaximumBlockWeight::get()
900-
} else {
901-
<Runtime as system::Trait>::DbWeight::get().reads(1) + 500_000_000
902-
}
895+
500_000_000
903896
}
904897
}
905898

runtime/polkadot/src/lib.rs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,8 @@ impl system::Trait for Runtime {
183183
impl scheduler::Trait for Runtime {
184184
type Event = Event;
185185
type Origin = Origin;
186-
type PalletsOrigin = OriginCaller;
187186
type Call = Call;
188187
type MaximumWeight = MaximumBlockWeight;
189-
type ScheduleOrigin = EnsureRoot<AccountId>;
190188
}
191189

192190
parameter_types! {
@@ -444,7 +442,6 @@ impl democracy::Trait for Runtime {
444442
type OperationalPreimageOrigin = collective::EnsureMember<AccountId, CouncilCollective>;
445443
type Slash = Treasury;
446444
type Scheduler = Scheduler;
447-
type PalletsOrigin = OriginCaller;
448445
type MaxVotes = MaxVotes;
449446
}
450447

@@ -896,17 +893,6 @@ impl proxy::Trait for Runtime {
896893
type MaxProxies = MaxProxies;
897894
}
898895

899-
pub struct CustomOnRuntimeUpgrade;
900-
impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
901-
fn on_runtime_upgrade() -> frame_support::weights::Weight {
902-
if scheduler::Module::<Runtime>::migrate_v1_to_t2() {
903-
<Runtime as system::Trait>::MaximumBlockWeight::get()
904-
} else {
905-
<Runtime as system::Trait>::DbWeight::get().reads(1)
906-
}
907-
}
908-
}
909-
910896
construct_runtime! {
911897
pub enum Runtime where
912898
Block = Block,
@@ -1004,14 +990,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signatu
1004990
/// Extrinsic type that has already been checked.
1005991
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Nonce, Call>;
1006992
/// Executive: handles dispatch to the various modules.
1007-
pub type Executive = executive::Executive<
1008-
Runtime,
1009-
Block,
1010-
system::ChainContext<Runtime>,
1011-
Runtime,
1012-
AllModules,
1013-
CustomOnRuntimeUpgrade
1014-
>;
993+
pub type Executive = executive::Executive<Runtime, Block, system::ChainContext<Runtime>, Runtime, AllModules>;
1015994
/// The payload being signed in transactions.
1016995
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
1017996

runtime/westend/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ use im_online::sr25519::AuthorityId as ImOnlineId;
5858
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
5959
use transaction_payment_rpc_runtime_api::RuntimeDispatchInfo;
6060
use session::historical as session_historical;
61-
use system::EnsureRoot;
6261

6362
#[cfg(feature = "std")]
6463
pub use staking::StakerStatus;
@@ -142,10 +141,8 @@ impl system::Trait for Runtime {
142141
impl scheduler::Trait for Runtime {
143142
type Event = Event;
144143
type Origin = Origin;
145-
type PalletsOrigin = OriginCaller;
146144
type Call = Call;
147145
type MaximumWeight = MaximumBlockWeight;
148-
type ScheduleOrigin = EnsureRoot<AccountId>;
149146
}
150147

151148
parameter_types! {

0 commit comments

Comments
 (0)