diff --git a/substrate/frame/alliance/src/tests.rs b/substrate/frame/alliance/src/tests.rs index de7cda4710fc7dec4832afa88787d852891a0658..098fd86bbae1ec6ed6d2abbd2c24430e690a6e93 100644 --- a/substrate/frame/alliance/src/tests.rs +++ b/substrate/frame/alliance/src/tests.rs @@ -299,7 +299,7 @@ fn close_works() { })), record(mock::RuntimeEvent::AllianceMotion(AllianceMotionEvent::Executed { proposal_hash: hash, - result: Err(DispatchError::BadOrigin), + result: Ok(()), })) ] ); diff --git a/substrate/frame/collective/src/benchmarking.rs b/substrate/frame/collective/src/benchmarking.rs index bcd203c3894a3dbc8c634b0b0d300e4058b9bfe8..8a4495ef4095b097d5b242c0e6ca821181d11bc9 100644 --- a/substrate/frame/collective/src/benchmarking.rs +++ b/substrate/frame/collective/src/benchmarking.rs @@ -131,7 +131,7 @@ benchmarks_instance_pallet! { let proposal_hash = T::Hashing::hash_of(&proposal); // Note that execution fails due to mis-matched origin assert_last_event::<T, I>( - Event::MemberExecuted { proposal_hash, result: Err(DispatchError::BadOrigin) }.into() + Event::MemberExecuted { proposal_hash, result: Ok(()) }.into() ); } @@ -162,7 +162,7 @@ benchmarks_instance_pallet! { let proposal_hash = T::Hashing::hash_of(&proposal); // Note that execution fails due to mis-matched origin assert_last_event::<T, I>( - Event::Executed { proposal_hash, result: Err(DispatchError::BadOrigin) }.into() + Event::Executed { proposal_hash, result: Ok(()) }.into() ); } @@ -441,7 +441,7 @@ benchmarks_instance_pallet! { verify { // The last proposal is removed. assert_eq!(Collective::<T, I>::proposals().len(), (p - 1) as usize); - assert_last_event::<T, I>(Event::Executed { proposal_hash: last_hash, result: Err(DispatchError::BadOrigin) }.into()); + assert_last_event::<T, I>(Event::Executed { proposal_hash: last_hash, result: Ok(()) }.into()); } close_disapproved { @@ -595,7 +595,7 @@ benchmarks_instance_pallet! { }: close(SystemOrigin::Signed(caller), last_hash, p - 1, Weight::MAX, bytes_in_storage) verify { assert_eq!(Collective::<T, I>::proposals().len(), (p - 1) as usize); - assert_last_event::<T, I>(Event::Executed { proposal_hash: last_hash, result: Err(DispatchError::BadOrigin) }.into()); + assert_last_event::<T, I>(Event::Executed { proposal_hash: last_hash, result: Ok(()) }.into()); } disapprove_proposal { diff --git a/substrate/frame/system/src/lib.rs b/substrate/frame/system/src/lib.rs index 79cdcf22f55c7c635f06f14a8f8451b6d6d2089a..a48a1e459f32ab3caaea755d1d6db586cd8457a7 100644 --- a/substrate/frame/system/src/lib.rs +++ b/substrate/frame/system/src/lib.rs @@ -414,11 +414,10 @@ pub mod pallet { impl<T: Config> Pallet<T> { /// Make some on-chain remark. /// - /// - `O(1)` + /// Can be executed by every `origin`. #[pallet::call_index(0)] #[pallet::weight(T::SystemWeightInfo::remark(_remark.len() as u32))] - pub fn remark(origin: OriginFor<T>, _remark: Vec<u8>) -> DispatchResultWithPostInfo { - ensure_signed_or_root(origin)?; + pub fn remark(_origin: OriginFor<T>, _remark: Vec<u8>) -> DispatchResultWithPostInfo { Ok(().into()) }