Revert "Companion PR for Allow specify schedule dispatch origin #6387" (#1340)

This commit is contained in:
Gavin Wood
2020-07-02 15:09:03 +02:00
committed by GitHub
parent b05d7413bf
commit aeae0e1422
4 changed files with 4 additions and 35 deletions
+2 -9
View File
@@ -152,10 +152,8 @@ impl system::Trait for Runtime {
impl scheduler::Trait for Runtime {
type Event = Event;
type Origin = Origin;
type PalletsOrigin = OriginCaller;
type Call = Call;
type MaximumWeight = MaximumBlockWeight;
type ScheduleOrigin = EnsureRoot<AccountId>;
}
parameter_types! {
@@ -375,7 +373,6 @@ impl democracy::Trait for Runtime {
type PreimageByteDeposit = PreimageByteDeposit;
type Slash = Treasury;
type Scheduler = Scheduler;
type PalletsOrigin = OriginCaller;
type MaxVotes = MaxVotes;
type OperationalPreimageOrigin = collective::EnsureMember<AccountId, CouncilCollective>;
}
@@ -892,14 +889,10 @@ impl proxy::Trait for Runtime {
}
pub struct CustomOnRuntimeUpgrade;
impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
treasury::Module::<Runtime>::migrate_retract_tip_for_tip_new();
if scheduler::Module::<Runtime>::migrate_v1_to_t2() {
<Runtime as system::Trait>::MaximumBlockWeight::get()
} else {
<Runtime as system::Trait>::DbWeight::get().reads(1) + 500_000_000
}
500_000_000
}
}