From 488e6d6c2acfdef47e4f2ff3607f1af9772b6466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Molina?= Date: Wed, 21 Aug 2024 10:24:18 +0200 Subject: [PATCH 1/6] Use correctly the WeightInfo call --- cumulus/pallets/collator-selection/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cumulus/pallets/collator-selection/src/lib.rs b/cumulus/pallets/collator-selection/src/lib.rs index 17dc1a552c2de..9d7e62af3c68f 100644 --- a/cumulus/pallets/collator-selection/src/lib.rs +++ b/cumulus/pallets/collator-selection/src/lib.rs @@ -972,7 +972,7 @@ pub mod pallet { let result = Self::assemble_collators(); frame_system::Pallet::::register_extra_weight_unchecked( - T::WeightInfo::new_session(candidates_len_before, removed), + T::WeightInfo::new_session(removed, candidates_len_before), DispatchClass::Mandatory, ); Some(result) From 7c68f4debc6d38cf0507da4a2921813599430786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Molina?= Date: Wed, 21 Aug 2024 10:36:11 +0200 Subject: [PATCH 2/6] Add prdoc --- prdoc/pr_5430.prdoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 prdoc/pr_5430.prdoc diff --git a/prdoc/pr_5430.prdoc b/prdoc/pr_5430.prdoc new file mode 100644 index 0000000000000..052bb7a10ca84 --- /dev/null +++ b/prdoc/pr_5430.prdoc @@ -0,0 +1,13 @@ +# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 +# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json + +title: pallet-collator-staking: ese correctly the `WeightInfo` call for `new_session` + +doc: + - audience: Runtime Dev + description: | + - Fixes an incorrect usage of the `WeightInfo` trait for `new_session`. + +crates: + - name: pallet-collator-selection + bump: minor From 3ed72eb13cfa4482fa5bfc48a5b74909c1eecd62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Molina?= Date: Wed, 21 Aug 2024 10:55:19 +0200 Subject: [PATCH 3/6] Fix prdoc --- prdoc/pr_5430.prdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prdoc/pr_5430.prdoc b/prdoc/pr_5430.prdoc index 052bb7a10ca84..f82858a549e1f 100644 --- a/prdoc/pr_5430.prdoc +++ b/prdoc/pr_5430.prdoc @@ -1,7 +1,7 @@ # Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 # See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json -title: pallet-collator-staking: ese correctly the `WeightInfo` call for `new_session` +title: "pallet-collator-staking: use correctly the `WeightInfo` call for `new_session`" doc: - audience: Runtime Dev From b39c13321413344b0fa973ced65dbf8047796bb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Molina?= Date: Wed, 21 Aug 2024 11:03:25 +0200 Subject: [PATCH 4/6] Fix prdoc again --- prdoc/pr_5430.prdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prdoc/pr_5430.prdoc b/prdoc/pr_5430.prdoc index f82858a549e1f..0be6618930b7c 100644 --- a/prdoc/pr_5430.prdoc +++ b/prdoc/pr_5430.prdoc @@ -9,5 +9,5 @@ doc: - Fixes an incorrect usage of the `WeightInfo` trait for `new_session`. crates: - - name: pallet-collator-selection - bump: minor + - name: pallet-collator-selection + bump: minor From cce987dcffda1388a0e1466679cbf7e428d85f80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Molina?= Date: Wed, 21 Aug 2024 11:05:29 +0200 Subject: [PATCH 5/6] Fix prdoc title --- prdoc/pr_5430.prdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prdoc/pr_5430.prdoc b/prdoc/pr_5430.prdoc index 0be6618930b7c..c0a1343d58cd9 100644 --- a/prdoc/pr_5430.prdoc +++ b/prdoc/pr_5430.prdoc @@ -1,7 +1,7 @@ # Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 # See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json -title: "pallet-collator-staking: use correctly the `WeightInfo` call for `new_session`" +title: "pallet-collator-selection: use correctly the `WeightInfo` call for `new_session`" doc: - audience: Runtime Dev From 07d5cae73fca582564888aeb12ec841563ba55ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Molina?= Date: Wed, 21 Aug 2024 11:12:18 +0200 Subject: [PATCH 6/6] Improve prdoc --- prdoc/pr_5430.prdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prdoc/pr_5430.prdoc b/prdoc/pr_5430.prdoc index c0a1343d58cd9..83d6d81e252e2 100644 --- a/prdoc/pr_5430.prdoc +++ b/prdoc/pr_5430.prdoc @@ -1,7 +1,7 @@ # Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 # See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json -title: "pallet-collator-selection: use correctly the `WeightInfo` call for `new_session`" +title: "pallet-collator-selection: correctly register weight in `new_session`" doc: - audience: Runtime Dev @@ -10,4 +10,4 @@ doc: crates: - name: pallet-collator-selection - bump: minor + bump: patch