--- a/runtime/common/config/pallets/scheduler.rs
+++ b/runtime/common/config/pallets/scheduler.rs
@@ -14,10 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Unique Network. If not, see .
-use frame_support::{traits::PrivilegeCmp, weights::Weight, parameter_types};
+use frame_support::{traits::EqualPrivilegeOnly, weights::Weight, parameter_types};
use frame_system::EnsureSigned;
use sp_runtime::Perbill;
-use sp_std::cmp::Ordering;
use crate::{
runtime_common::{scheduler::SchedulerPaymentExecutor, config::substrate::RuntimeBlockWeights},
Runtime, Call, Event, Origin, OriginCaller, Balances,
@@ -31,15 +30,6 @@
pub const NoPreimagePostponement: Option = Some(10);
pub const Preimage: Option = Some(10);
-}
-
-/// Used the compare the privilege of an origin inside the scheduler.
-pub struct OriginPrivilegeCmp;
-
-impl PrivilegeCmp for OriginPrivilegeCmp {
- fn cmp_privilege(_left: &OriginCaller, _right: &OriginCaller) -> Option {
- Some(Ordering::Equal)
- }
}
impl pallet_unique_scheduler::Config for Runtime {
@@ -53,7 +43,7 @@
type MaxScheduledPerBlock = MaxScheduledPerBlock;
type WeightInfo = ();
type CallExecutor = SchedulerPaymentExecutor;
- type OriginPrivilegeCmp = OriginPrivilegeCmp;
+ type OriginPrivilegeCmp = EqualPrivilegeOnly;
type PreimageProvider = ();
type NoPreimagePostponement = NoPreimagePostponement;
}