From dd61c602f381a7a8cf225cecfeb404edce0fd5e5 Mon Sep 17 00:00:00 2001 From: thiolliere Date: Tue, 2 Nov 2021 14:42:48 +0100 Subject: [PATCH 1/3] warn --- frame/collective/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frame/collective/src/lib.rs b/frame/collective/src/lib.rs index 89d4c8a150c36..386c8edeb3be4 100644 --- a/frame/collective/src/lib.rs +++ b/frame/collective/src/lib.rs @@ -345,6 +345,13 @@ pub mod pallet { /// NOTE: Does not enforce the expected `MaxMembers` limit on the amount of members, but /// the weight estimations rely on it to estimate dispatchable weight. /// + /// # WARNING: + /// + /// The pallet collective can also be managed by logic outside of the pallet throught the + /// implementation of the trait [`ChangeMembers`]. + /// Any call to `set_members` must be careful that member set doesn't get out of sync with + /// other logic managing the member set. + /// /// # /// ## Weight /// - `O(MP + N)` where: From b186aab656079714cd57324ebf2602e61511717e Mon Sep 17 00:00:00 2001 From: Guillaume Thiolliere Date: Tue, 2 Nov 2021 21:37:31 +0100 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com> --- frame/collective/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/collective/src/lib.rs b/frame/collective/src/lib.rs index 386c8edeb3be4..fb5e3ed6cef3b 100644 --- a/frame/collective/src/lib.rs +++ b/frame/collective/src/lib.rs @@ -347,9 +347,9 @@ pub mod pallet { /// /// # WARNING: /// - /// The pallet collective can also be managed by logic outside of the pallet throught the + /// The `pallet-collective` can also be managed by logic outside of the pallet through the /// implementation of the trait [`ChangeMembers`]. - /// Any call to `set_members` must be careful that member set doesn't get out of sync with + /// Any call to `set_members` must be careful that the member set doesn't get out of sync with /// other logic managing the member set. /// /// # From e67519b0f6fd01ccfc231741765873133c1fd162 Mon Sep 17 00:00:00 2001 From: thiolliere Date: Tue, 2 Nov 2021 21:38:10 +0100 Subject: [PATCH 3/3] fmt --- frame/collective/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frame/collective/src/lib.rs b/frame/collective/src/lib.rs index fb5e3ed6cef3b..2797d01ffcdba 100644 --- a/frame/collective/src/lib.rs +++ b/frame/collective/src/lib.rs @@ -349,8 +349,8 @@ pub mod pallet { /// /// The `pallet-collective` can also be managed by logic outside of the pallet through the /// implementation of the trait [`ChangeMembers`]. - /// Any call to `set_members` must be careful that the member set doesn't get out of sync with - /// other logic managing the member set. + /// Any call to `set_members` must be careful that the member set doesn't get out of sync + /// with other logic managing the member set. /// /// # /// ## Weight