Skip to content
Snippets Groups Projects
Commit 7e4d175c authored by Éloïs's avatar Éloïs
Browse files

ref(runtimes): remove our OriginPrivilegeCmp implementation

parent 575a28d1
No related branches found
No related tags found
1 merge request!43Params
...@@ -84,17 +84,6 @@ macro_rules! pallets_config { ...@@ -84,17 +84,6 @@ macro_rules! pallets_config {
BlockWeights::get().max_block; BlockWeights::get().max_block;
pub const MaxScheduledPerBlock: u32 = 50; pub const MaxScheduledPerBlock: u32 = 50;
} }
/// Used the compare the privilege of an origin inside the scheduler.
pub struct OriginPrivilegeCmp;
impl frame_support::traits::PrivilegeCmp<OriginCaller> for OriginPrivilegeCmp {
fn cmp_privilege(left: &OriginCaller, right: &OriginCaller) -> Option<core::cmp::Ordering> {
if left == right {
Some(core::cmp::Ordering::Equal)
} else {
None
}
}
}
impl pallet_scheduler::Config for Runtime { impl pallet_scheduler::Config for Runtime {
type Event = Event; type Event = Event;
type Origin = Origin; type Origin = Origin;
...@@ -102,7 +91,7 @@ macro_rules! pallets_config { ...@@ -102,7 +91,7 @@ macro_rules! pallets_config {
type Call = Call; type Call = Call;
type MaximumWeight = MaximumSchedulerWeight; type MaximumWeight = MaximumSchedulerWeight;
type ScheduleOrigin = frame_system::EnsureSigned<AccountId>; type ScheduleOrigin = frame_system::EnsureSigned<AccountId>;
type OriginPrivilegeCmp = OriginPrivilegeCmp; type OriginPrivilegeCmp = EqualPrivilegeOnly;
type MaxScheduledPerBlock = MaxScheduledPerBlock; type MaxScheduledPerBlock = MaxScheduledPerBlock;
type WeightInfo = pallet_scheduler::weights::SubstrateWeight<Runtime>; type WeightInfo = pallet_scheduler::weights::SubstrateWeight<Runtime>;
type PreimageProvider = (); type PreimageProvider = ();
......
...@@ -60,7 +60,7 @@ use sp_version::RuntimeVersion; ...@@ -60,7 +60,7 @@ use sp_version::RuntimeVersion;
// A few exports that help ease life for downstream crates. // A few exports that help ease life for downstream crates.
pub use frame_support::{ pub use frame_support::{
construct_runtime, parameter_types, construct_runtime, parameter_types,
traits::{KeyOwnerProofSystem, Randomness}, traits::{EqualPrivilegeOnly, KeyOwnerProofSystem, Randomness},
weights::{ weights::{
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial,
......
...@@ -61,7 +61,7 @@ use sp_version::RuntimeVersion; ...@@ -61,7 +61,7 @@ use sp_version::RuntimeVersion;
// A few exports that help ease life for downstream crates. // A few exports that help ease life for downstream crates.
pub use frame_support::{ pub use frame_support::{
construct_runtime, parameter_types, construct_runtime, parameter_types,
traits::{KeyOwnerProofSystem, Randomness}, traits::{EqualPrivilegeOnly, KeyOwnerProofSystem, Randomness},
weights::{ weights::{
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial,
......
...@@ -60,7 +60,7 @@ use sp_version::RuntimeVersion; ...@@ -60,7 +60,7 @@ use sp_version::RuntimeVersion;
// A few exports that help ease life for downstream crates. // A few exports that help ease life for downstream crates.
pub use frame_support::{ pub use frame_support::{
construct_runtime, parameter_types, construct_runtime, parameter_types,
traits::{KeyOwnerProofSystem, Randomness}, traits::{EqualPrivilegeOnly, KeyOwnerProofSystem, Randomness},
weights::{ weights::{
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment