From bcbe37fbbb1a548d66a89c760f4bf8ffca65777f Mon Sep 17 00:00:00 2001 From: Peter Goodspeed-Niklaus Date: Thu, 8 Jul 2021 13:42:36 +0200 Subject: [PATCH] make submit_unsigned into DispatchClass::Operational Closes #8511. --- frame/election-provider-multi-phase/src/lib.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/frame/election-provider-multi-phase/src/lib.rs b/frame/election-provider-multi-phase/src/lib.rs index cea42fc08b460..f1d01a248111e 100644 --- a/frame/election-provider-multi-phase/src/lib.rs +++ b/frame/election-provider-multi-phase/src/lib.rs @@ -829,11 +829,14 @@ pub mod pallet { /// putting their authoring reward at risk. /// /// No deposit or reward is associated with this submission. - #[pallet::weight(T::WeightInfo::submit_unsigned( - witness.voters, - witness.targets, - solution.compact.voter_count() as u32, - solution.compact.unique_targets().len() as u32 + #[pallet::weight(( + T::WeightInfo::submit_unsigned( + witness.voters, + witness.targets, + solution.compact.voter_count() as u32, + solution.compact.unique_targets().len() as u32 + ), + DispatchClass::Operational, ))] pub fn submit_unsigned( origin: OriginFor, @@ -904,7 +907,7 @@ pub mod pallet { // Note: we don't `rotate_round` at this point; the next call to // `ElectionProvider::elect` will succeed and take care of that. - + let solution = ReadySolution { supports, score: [0, 0, 0],