Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pallet-collator-selection: correctly register weight in new_session #5430

Merged
merged 6 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cumulus/pallets/collator-selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ pub mod pallet {
let result = Self::assemble_collators();

frame_system::Pallet::<T>::register_extra_weight_unchecked(
T::WeightInfo::new_session(candidates_len_before, removed),
T::WeightInfo::new_session(removed, candidates_len_before),
DispatchClass::Mandatory,
);
Some(result)
Expand Down
13 changes: 13 additions & 0 deletions prdoc/pr_5430.prdoc
Original file line number Diff line number Diff line change
@@ -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-selection: use correctly the `WeightInfo` call for `new_session`"
Moliholy marked this conversation as resolved.
Show resolved Hide resolved

doc:
- audience: Runtime Dev
description: |
- Fixes an incorrect usage of the `WeightInfo` trait for `new_session`.

crates:
- name: pallet-collator-selection
bump: minor
Moliholy marked this conversation as resolved.
Show resolved Hide resolved
Loading