Browse Source

runtime: proposal: use veto proposal for emergency cancelation

conectado 4 years ago
parent
commit
9c232b0ae0

+ 4 - 4
runtime-modules/proposals/codex/src/benchmarking.rs

@@ -313,14 +313,14 @@ benchmarks! {
         );
     }
 
-    create_proposal_emergency_proposal_cancellation {
+    create_proposal_veto_proposal {
         let t in ...;
         let d in ...;
 
         let (account_id, member_id, general_proposal_paramters) =
             create_proposal_parameters::<T>(t, d);
 
-        let proposal_details = ProposalDetails::EmergencyProposalCancellation(0.into());
+        let proposal_details = ProposalDetails::VetoProposal(0.into());
     }: create_proposal(
         RawOrigin::Signed(account_id.clone()),
         general_proposal_paramters.clone(),
@@ -1155,9 +1155,9 @@ mod tests {
     }
 
     #[test]
-    fn test_create_proposal_emergency_proposal_cancellation() {
+    fn test_create_proposal_veto_proposal() {
         initial_test_ext().execute_with(|| {
-            assert_ok!(test_benchmark_create_proposal_emergency_proposal_cancellation::<Test>());
+            assert_ok!(test_benchmark_create_proposal_veto_proposal::<Test>());
         });
     }
 }

+ 9 - 13
runtime-modules/proposals/codex/src/lib.rs

@@ -113,7 +113,7 @@ pub trait WeightInfo {
     fn create_proposal_edit_blog_post(t: u32, d: u32, h: u32, b: u32) -> Weight;
     fn create_proposal_lock_blog_post(t: u32) -> Weight;
     fn create_proposal_unlock_blog_post() -> Weight;
-    fn create_proposal_emergency_proposal_cancellation(d: u32) -> Weight;
+    fn create_proposal_veto_proposal(d: u32) -> Weight;
     fn update_working_group_budget_positive_forum() -> Weight;
     fn update_working_group_budget_negative_forum() -> Weight;
     fn update_working_group_budget_positive_storage() -> Weight;
@@ -266,10 +266,8 @@ pub trait Trait:
         ProposalParameters<Self::BlockNumber, BalanceOf<Self>>,
     >;
 
-    /// `Emergency Proposal Cancellation` proposal parameters
-    type EmergencyProposalCancellationProposalParameters: Get<
-        ProposalParameters<Self::BlockNumber, BalanceOf<Self>>,
-    >;
+    /// `Veto Proposal` proposal parameters
+    type VetoProposalProposalParameters: Get<ProposalParameters<Self::BlockNumber, BalanceOf<Self>>>;
 
     /// Gets the budget of the given WorkingGroup
     fn get_working_group_budget(working_group: WorkingGroup) -> BalanceOf<Self>;
@@ -490,8 +488,8 @@ decl_module! {
         const UnlockBlogPostProposalParameters:
             ProposalParameters<T::BlockNumber, BalanceOf<T>> = T::UnlockBlogPostProposalParameters::get();
 
-        const EmergencyProposalCancellationProposalParameters:
-            ProposalParameters<T::BlockNumber, BalanceOf<T>> = T::EmergencyProposalCancellationProposalParameters::get();
+        const VetoProposalProposalParameters:
+            ProposalParameters<T::BlockNumber, BalanceOf<T>> = T::VetoProposalProposalParameters::get();
 
 
         /// Create a proposal, the type of proposal depends on the `proposal_details` variant
@@ -780,7 +778,7 @@ impl<T: Trait> Module<T> {
             ProposalDetails::UnlockBlogPost(..) => {
                 // Note: No checks for this proposal for now
             }
-            ProposalDetails::EmergencyProposalCancellation(..) => {
+            ProposalDetails::VetoProposal(..) => {
                 // Note: No checks for this proposal for now
             }
         }
@@ -847,9 +845,7 @@ impl<T: Trait> Module<T> {
             ProposalDetails::EditBlogPost(..) => T::EditBlogPostProoposalParamters::get(),
             ProposalDetails::LockBlogPost(..) => T::LockBlogPostProposalParameters::get(),
             ProposalDetails::UnlockBlogPost(..) => T::UnlockBlogPostProposalParameters::get(),
-            ProposalDetails::EmergencyProposalCancellation(..) => {
-                T::EmergencyProposalCancellationProposalParameters::get()
-            }
+            ProposalDetails::VetoProposal(..) => T::VetoProposalProposalParameters::get(),
         }
     }
 
@@ -1018,8 +1014,8 @@ impl<T: Trait> Module<T> {
             ProposalDetails::UnlockBlogPost(..) => {
                 WeightInfoCodex::<T>::create_proposal_unlock_blog_post().saturated_into()
             }
-            ProposalDetails::EmergencyProposalCancellation(..) => {
-                WeightInfoCodex::<T>::create_proposal_emergency_proposal_cancellation(
+            ProposalDetails::VetoProposal(..) => {
+                WeightInfoCodex::<T>::create_proposal_veto_proposal(
                     description_length.saturated_into(),
                 )
                 .saturated_into()

+ 2 - 6
runtime-modules/proposals/codex/src/tests/mock.rs

@@ -262,10 +262,6 @@ impl proposals_engine::WeightInfo for MockProposalsEngineWeight {
     fn cancel_active_and_pending_proposals(_: u32) -> u64 {
         0
     }
-
-    fn emergency_proposal_cancellation() -> Weight {
-        0
-    }
 }
 
 impl Default for crate::Call<Test> {
@@ -599,7 +595,7 @@ impl crate::Trait for Test {
     type EditBlogPostProoposalParamters = DefaultProposalParameters;
     type LockBlogPostProposalParameters = DefaultProposalParameters;
     type UnlockBlogPostProposalParameters = DefaultProposalParameters;
-    type EmergencyProposalCancellationProposalParameters = DefaultProposalParameters;
+    type VetoProposalProposalParameters = DefaultProposalParameters;
 
     fn get_working_group_budget(working_group: WorkingGroup) -> BalanceOf<Test> {
         call_wg!(working_group<Test>, get_budget)
@@ -877,7 +873,7 @@ impl crate::WeightInfo for () {
     fn create_proposal_unlock_blog_post() -> Weight {
         0
     }
-    fn create_proposal_emergency_proposal_cancellation(_: u32) -> Weight {
+    fn create_proposal_veto_proposal(_: u32) -> Weight {
         0
     }
     fn update_working_group_budget_positive_forum() -> Weight {

+ 3 - 4
runtime-modules/proposals/codex/src/tests/mod.rs

@@ -675,7 +675,7 @@ fn create_set_max_validator_count_proposal_common_checks_succeed() {
 }
 
 #[test]
-fn create_emergency_proposal_cancellation_common_checks_succeed() {
+fn create_veto_proposal_common_checks_succeed() {
     initial_test_ext().execute_with(|| {
         increase_total_balance_issuance_using_account_id(1, 500000);
 
@@ -695,7 +695,7 @@ fn create_emergency_proposal_cancellation_common_checks_succeed() {
             exact_execution_block: None,
         };
 
-        let proposal_details = ProposalDetails::EmergencyProposalCancellation(0);
+        let proposal_details = ProposalDetails::VetoProposal(0);
 
         let proposal_fixture = ProposalTestFixture {
             general_proposal_parameters: general_proposal_parameters.clone(),
@@ -721,8 +721,7 @@ fn create_emergency_proposal_cancellation_common_checks_succeed() {
                     proposal_details.clone(),
                 )
             },
-            proposal_parameters:
-                <Test as crate::Trait>::EmergencyProposalCancellationProposalParameters::get(),
+            proposal_parameters: <Test as crate::Trait>::VetoProposalProposalParameters::get(),
         };
         proposal_fixture.check_all();
     });

+ 1 - 1
runtime-modules/proposals/codex/src/types.rs

@@ -119,7 +119,7 @@ pub enum ProposalDetails<Balance, BlockNumber, AccountId, WorkerId, OpeningId, P
     UnlockBlogPost(PostId),
 
     /// `Veto Proposal` proposal
-    EmergencyProposalCancellation(ProposalId),
+    VetoProposal(ProposalId),
 }
 
 impl<Balance, BlockNumber, AccountId, WorkerId, OpeningId, PostId, ProposalId> Default

+ 0 - 36
runtime-modules/proposals/engine/src/benchmarking.rs

@@ -431,35 +431,6 @@ benchmarks! {
         );
     }
 
-    emergency_proposal_cancellation {
-        let (account_ids, proposals) = create_multiple_finalized_proposals::<T>(1, 0, VoteKind::Approve,
-            1, 5);
-
-        assert_eq!(account_ids.len(), 1);
-        let proposal_id = *proposals.last().unwrap();
-        let account_id = account_ids.last().unwrap().clone();
-
-        assert_eq!(ProposalsEngine::<T>::active_proposal_count(), 1);
-
-        run_to_block::<T>(System::<T>::block_number() + One::one());
-
-        let _ = Balances::<T>::make_free_balance_be(&account_id, T::Balance::max_value());
-    }: _ (RawOrigin::Root, proposal_id)
-    verify {
-        assert!(!Proposals::<T>::contains_key(proposal_id), "Proposal still in storage");
-
-        assert!(
-            !DispatchableCallCode::<T>::contains_key(proposal_id),
-            "Proposal code still in storage"
-        );
-
-        assert_eq!(ProposalsEngine::<T>::active_proposal_count(), 0, "Proposal still active");
-
-        assert_last_event::<T>(
-            RawEvent::ProposalDecisionMade(proposal_id, ProposalDecision::Canceled).into()
-        );
-    }
-
     veto_proposal {
         let (account_id, _, proposal_id) = create_proposal::<T>(0, 1, 0, 0);
     }: _ (RawOrigin::Root, proposal_id)
@@ -851,11 +822,4 @@ mod tests {
             assert_ok!(test_benchmark_cancel_active_and_pending_proposals::<Test>());
         });
     }
-
-    #[test]
-    fn test_emergency_cancellation_proposal() {
-        initial_test_ext().execute_with(|| {
-            assert_ok!(test_benchmark_emergency_proposal_cancellation::<Test>());
-        });
-    }
 }

+ 3 - 27
runtime-modules/proposals/engine/src/lib.rs

@@ -167,7 +167,6 @@ pub trait WeightInfo {
     fn on_initialize_rejected(i: u32) -> Weight;
     fn on_initialize_slashed(i: u32) -> Weight;
     fn cancel_active_and_pending_proposals(i: u32) -> Weight;
-    fn emergency_proposal_cancellation() -> Weight;
 }
 
 type WeightInfoEngine<T> = <T as Trait>::WeightInfo;
@@ -532,38 +531,15 @@ decl_module! {
             ensure!(<Proposals<T>>::contains_key(proposal_id), Error::<T>::ProposalNotFound);
             let proposal = Self::proposals(proposal_id);
 
-            ensure!(
-                proposal.status.is_active_or_pending_execution(),
-                Error::<T>::ProposalFinalized
-            );
-
+            // Note: we don't need to check if the proposal is active pending execution or
+            // or pending constitutionality since if it in the storage `Proposals` it follows
+            // that it is in one of those states.
             //
             // == MUTATION SAFE ==
             //
 
             Self::finalize_proposal(proposal_id, proposal, ProposalDecision::Vetoed);
         }
-
-        /// Cancel a proposal within grace period. Must be root.
-        #[weight = WeightInfoEngine::<T>::emergency_proposal_cancellation()]
-        pub fn emergency_proposal_cancellation(origin, proposal_id: T::ProposalId) {
-            ensure_root(origin)?;
-
-            ensure!(<Proposals<T>>::contains_key(proposal_id), Error::<T>::ProposalNotFound);
-            let proposal = Self::proposals(proposal_id);
-
-            ensure!(
-                proposal.status.is_pending_execution_proposal(),
-                Error::<T>::ProposalNotPendingExecution
-            );
-
-            //
-            // == MUTATION SAFE ==
-            //
-
-            Self::finalize_proposal(proposal_id, proposal, ProposalDecision::Canceled);
-        }
-
     }
 }
 

+ 0 - 4
runtime-modules/proposals/engine/src/tests/mock/mod.rs

@@ -347,10 +347,6 @@ impl crate::WeightInfo for () {
     fn cancel_active_and_pending_proposals(_: u32) -> u64 {
         0
     }
-
-    fn emergency_proposal_cancellation() -> Weight {
-        0
-    }
 }
 
 impl ProposalObserver<Test> for () {

+ 47 - 60
runtime-modules/proposals/engine/src/tests/mod.rs

@@ -231,27 +231,6 @@ impl VetoProposalFixture {
     }
 }
 
-struct EmergencyProposalCancellationFixture {
-    origin: RawOrigin<u64>,
-    proposal_id: u32,
-}
-
-impl EmergencyProposalCancellationFixture {
-    fn new(proposal_id: u32) -> Self {
-        EmergencyProposalCancellationFixture {
-            proposal_id,
-            origin: RawOrigin::Root,
-        }
-    }
-
-    fn cancel_and_assert(self, expected_result: DispatchResult) {
-        assert_eq!(
-            ProposalsEngine::emergency_proposal_cancellation(self.origin.into(), self.proposal_id,),
-            expected_result
-        );
-    }
-}
-
 struct VoteGenerator {
     proposal_id: u32,
     current_account_id: u64,
@@ -737,7 +716,7 @@ fn cancel_proposal_fails_with_insufficient_rights() {
 }
 
 #[test]
-fn veto_proposal_succeeds() {
+fn veto_proposal_succeeds_during_voting_period() {
     initial_test_ext().execute_with(|| {
         let starting_block = 1;
         run_to_block_and_finalize(starting_block);
@@ -753,6 +732,11 @@ fn veto_proposal_succeeds() {
         // internal active proposal counter check
         assert_eq!(<ActiveProposalCount>::get(), 1);
 
+        assert!(matches!(
+            <Proposals<Test>>::get(proposal_id).status,
+            ProposalStatus::Active{..}
+        ));
+
         let veto_proposal = VetoProposalFixture::new(proposal_id);
         veto_proposal.veto_and_assert(Ok(()));
 
@@ -768,26 +752,7 @@ fn veto_proposal_succeeds() {
 }
 
 #[test]
-fn veto_proposal_fails_with_not_existing_proposal() {
-    initial_test_ext().execute_with(|| {
-        let veto_proposal = VetoProposalFixture::new(2);
-        veto_proposal.veto_and_assert(Err(Error::<Test>::ProposalNotFound.into()));
-    });
-}
-
-#[test]
-fn veto_proposal_fails_with_insufficient_rights() {
-    initial_test_ext().execute_with(|| {
-        let dummy_proposal = DummyProposalFixture::default();
-        let proposal_id = dummy_proposal.create_proposal_and_assert(Ok(1)).unwrap();
-
-        let veto_proposal = VetoProposalFixture::new(proposal_id).with_origin(RawOrigin::Signed(2));
-        veto_proposal.veto_and_assert(Err(DispatchError::BadOrigin));
-    });
-}
-
-#[test]
-fn emergency_proposal_cancellation_succeeds() {
+fn veto_proposal_succeeds_during_grace_period() {
     initial_test_ext().execute_with(|| {
         let starting_block = 1;
         run_to_block_and_finalize(starting_block);
@@ -811,12 +776,17 @@ fn emergency_proposal_cancellation_succeeds() {
 
         run_to_block_and_finalize(6);
 
-        let cancel_proposal = EmergencyProposalCancellationFixture::new(proposal_id);
-        cancel_proposal.cancel_and_assert(Ok(()));
+        assert!(matches!(
+            <Proposals<Test>>::get(proposal_id).status,
+            ProposalStatus::PendingExecution{..}
+        ));
+
+        let veto_proposal = VetoProposalFixture::new(proposal_id);
+        veto_proposal.veto_and_assert(Ok(()));
 
         EventFixture::assert_last_crate_event(RawEvent::ProposalDecisionMade(
             proposal_id,
-            ProposalDecision::Canceled,
+            ProposalDecision::Vetoed,
         ));
 
         assert!(!<crate::Proposals<Test>>::contains_key(proposal_id));
@@ -826,15 +796,7 @@ fn emergency_proposal_cancellation_succeeds() {
 }
 
 #[test]
-fn emergency_proposal_cancellation_fails_with_not_existing_proposal() {
-    initial_test_ext().execute_with(|| {
-        let emergency_proposal = EmergencyProposalCancellationFixture::new(2);
-        emergency_proposal.cancel_and_assert(Err(Error::<Test>::ProposalNotFound.into()));
-    });
-}
-
-#[test]
-fn emergency_proposal_cancellation_fails_before_grace_period() {
+fn veto_proposal_succeeds_during_pending_constitutionality() {
     initial_test_ext().execute_with(|| {
         let starting_block = 1;
         run_to_block_and_finalize(starting_block);
@@ -842,7 +804,7 @@ fn emergency_proposal_cancellation_fails_before_grace_period() {
         // internal active proposal counter check
         assert_eq!(<ActiveProposalCount>::get(), 0);
 
-        let parameters_fixture = ProposalParametersFixture::default();
+        let parameters_fixture = ProposalParametersFixture::default().with_constitutionality(10);
         let dummy_proposal =
             DummyProposalFixture::default().with_parameters(parameters_fixture.params());
         let proposal_id = dummy_proposal.create_proposal_and_assert(Ok(1)).unwrap();
@@ -850,17 +812,42 @@ fn emergency_proposal_cancellation_fails_before_grace_period() {
         // internal active proposal counter check
         assert_eq!(<ActiveProposalCount>::get(), 1);
 
-        let cancel_proposal = EmergencyProposalCancellationFixture::new(proposal_id);
-        cancel_proposal.cancel_and_assert(Err(Error::<Test>::ProposalNotPendingExecution.into()));
+        let mut vote_generator = VoteGenerator::new(proposal_id);
+        vote_generator.vote_and_assert_ok(VoteKind::Approve);
+        vote_generator.vote_and_assert_ok(VoteKind::Approve);
+        vote_generator.vote_and_assert_ok(VoteKind::Approve);
 
-        assert!(<crate::Proposals<Test>>::contains_key(proposal_id));
+        run_to_block_and_finalize(6);
+
+        assert!(matches!(
+            <Proposals<Test>>::get(proposal_id).status,
+            ProposalStatus::PendingConstitutionality{..}
+        ));
+
+        let veto_proposal = VetoProposalFixture::new(proposal_id);
+        veto_proposal.veto_and_assert(Ok(()));
+
+        EventFixture::assert_last_crate_event(RawEvent::ProposalDecisionMade(
+            proposal_id,
+            ProposalDecision::Vetoed,
+        ));
+
+        assert!(!<crate::Proposals<Test>>::contains_key(proposal_id));
         // internal active proposal counter check
-        assert_eq!(<ActiveProposalCount>::get(), 1);
+        assert_eq!(<ActiveProposalCount>::get(), 0);
     });
 }
 
 #[test]
-fn emergency_proposal_fails_with_insufficient_rights() {
+fn veto_proposal_fails_with_not_existing_proposal() {
+    initial_test_ext().execute_with(|| {
+        let veto_proposal = VetoProposalFixture::new(2);
+        veto_proposal.veto_and_assert(Err(Error::<Test>::ProposalNotFound.into()));
+    });
+}
+
+#[test]
+fn veto_proposal_fails_with_insufficient_rights() {
     initial_test_ext().execute_with(|| {
         let dummy_proposal = DummyProposalFixture::default();
         let proposal_id = dummy_proposal.create_proposal_and_assert(Ok(1)).unwrap();

+ 3 - 3
runtime/src/integration/proposals/proposal_encoder.rs

@@ -135,9 +135,9 @@ impl ProposalEncoder<Runtime> for ExtrinsicProposalEncoder {
             ProposalDetails::UnlockBlogPost(post_id) => {
                 Call::Blog(blog::Call::unlock_post(post_id))
             }
-            ProposalDetails::EmergencyProposalCancellation(proposal_id) => Call::ProposalsEngine(
-                proposals_engine::Call::emergency_proposal_cancellation(proposal_id),
-            ),
+            ProposalDetails::VetoProposal(proposal_id) => {
+                Call::ProposalsEngine(proposals_engine::Call::veto_proposal(proposal_id))
+            }
         };
 
         call.encode()

+ 1 - 2
runtime/src/lib.rs

@@ -865,8 +865,7 @@ impl proposals_codex::Trait for Runtime {
     type EditBlogPostProoposalParamters = EditBlogPostProoposalParamters;
     type LockBlogPostProposalParameters = LockBlogPostProposalParameters;
     type UnlockBlogPostProposalParameters = UnlockBlogPostProposalParameters;
-    type EmergencyProposalCancellationProposalParameters =
-        EmergencyProposalCancellationProposalParameters;
+    type VetoProposalProposalParameters = VetoProposalProposalParameters;
     type WeightInfo = weights::proposals_codex::WeightInfo;
     fn get_working_group_budget(working_group: WorkingGroup) -> Balance {
         call_wg!(working_group, get_budget)

+ 2 - 3
runtime/src/proposals_configuration/defaults.rs

@@ -349,9 +349,8 @@ pub(crate) fn unlock_blog_post_proposal() -> ProposalParameters<BlockNumber, Bal
 }
 
 // TODO: decide on paramaters
-// Proposal parameters for the 'Emergency Proposal Cancellation' proposal
-pub(crate) fn emergency_proposal_cancellation_proposal() -> ProposalParameters<BlockNumber, Balance>
-{
+// Proposal parameters for the 'Veto Proposal' proposal
+pub(crate) fn veto_proposal_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
         voting_period: 10000,
         grace_period: 0,

+ 5 - 6
runtime/src/proposals_configuration/mod.rs

@@ -61,8 +61,8 @@ parameter_types! {
         ALL_PROPOSALS_PARAMETERS.lock_blog_post_proposal;
     pub UnlockBlogPostProposalParameters: ProposalParameters<BlockNumber, Balance> =
         ALL_PROPOSALS_PARAMETERS.unlock_blog_post_proposal;
-    pub EmergencyProposalCancellationProposalParameters: ProposalParameters<BlockNumber, Balance> =
-        ALL_PROPOSALS_PARAMETERS.emergency_proposal_cancellation_proposal;
+    pub VetoProposalProposalParameters: ProposalParameters<BlockNumber, Balance> =
+        ALL_PROPOSALS_PARAMETERS.veto_proposal_proposal;
 }
 
 ///////////
@@ -92,7 +92,7 @@ struct AllProposalsParameters {
     pub edit_blog_post_proposal: ProposalParameters<BlockNumber, Balance>,
     pub lock_blog_post_proposal: ProposalParameters<BlockNumber, Balance>,
     pub unlock_blog_post_proposal: ProposalParameters<BlockNumber, Balance>,
-    pub emergency_proposal_cancellation_proposal: ProposalParameters<BlockNumber, Balance>,
+    pub veto_proposal_proposal: ProposalParameters<BlockNumber, Balance>,
 }
 
 // to initialize parameters only once.
@@ -193,7 +193,7 @@ fn convert_json_object_to_proposal_parameters(
         init_proposal_parameter_object!(params, jo.clone(), edit_blog_post_proposal);
         init_proposal_parameter_object!(params, jo.clone(), lock_blog_post_proposal);
         init_proposal_parameter_object!(params, jo.clone(), unlock_blog_post_proposal);
-        init_proposal_parameter_object!(params, jo, emergency_proposal_cancellation_proposal);
+        init_proposal_parameter_object!(params, jo, veto_proposal_proposal);
     }
 
     params
@@ -328,7 +328,6 @@ fn default_parameters() -> AllProposalsParameters {
         edit_blog_post_proposal: defaults::edit_blog_post_proposal(),
         lock_blog_post_proposal: defaults::lock_blog_post_proposal(),
         unlock_blog_post_proposal: defaults::unlock_blog_post_proposal(),
-        emergency_proposal_cancellation_proposal:
-            defaults::emergency_proposal_cancellation_proposal(),
+        veto_proposal_proposal: defaults::veto_proposal_proposal(),
     }
 }

+ 2 - 2
runtime/src/tests/proposals_integration/mod.rs

@@ -728,7 +728,7 @@ fn unlock_blog_post_proposal_execution_succeeds() {
 }
 
 #[test]
-fn emergency_proposal_cancellation_proposal_execution_succeeds() {
+fn veto_proposal_proposal_execution_succeeds() {
     initial_test_ext().execute_with(|| {
         let member_id = 10;
         let account_id: [u8; 32] = [member_id; 32];
@@ -772,7 +772,7 @@ fn emergency_proposal_cancellation_proposal_execution_succeeds() {
             ProposalCodex::create_proposal(
                 RawOrigin::Signed(account_id.clone().into()).into(),
                 general_proposal_parameters,
-                ProposalDetails::EmergencyProposalCancellation(proposal_id),
+                ProposalDetails::VetoProposal(proposal_id),
             )
         })
         .with_member_id(member_id as u64)

+ 1 - 1
runtime/src/weights/proposals_codex.rs

@@ -173,7 +173,7 @@ impl proposals_codex::WeightInfo for WeightInfo {
             .saturating_add(DbWeight::get().reads(6 as Weight))
             .saturating_add(DbWeight::get().writes(10 as Weight))
     }
-    fn create_proposal_emergency_proposal_cancellation(d: u32) -> Weight {
+    fn create_proposal_veto_proposal(d: u32) -> Weight {
         (1_209_486_000 as Weight)
             .saturating_add((222_000 as Weight).saturating_mul(d as Weight))
             .saturating_add(DbWeight::get().reads(6 as Weight))

+ 0 - 5
runtime/src/weights/proposals_engine.rs

@@ -71,9 +71,4 @@ impl proposals_engine::WeightInfo for WeightInfo {
             .saturating_add(DbWeight::get().writes(2 as Weight))
             .saturating_add(DbWeight::get().writes((9 as Weight).saturating_mul(i as Weight)))
     }
-    fn emergency_proposal_cancellation() -> Weight {
-        (390_477_000 as Weight)
-            .saturating_add(DbWeight::get().reads(4 as Weight))
-            .saturating_add(DbWeight::get().writes(8 as Weight))
-    }
 }