Skip to content

Commit 6c86c52

Browse files
Doordashconbkchrggwpez
authored andcommitted
Simulate rank_to_votes in pallet-ranked-collective benchmark. (#9731)
resolves #9730 --------- Co-authored-by: Bastian Köcher <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]> (cherry picked from commit 1cbf4ee)
1 parent d9610ff commit 6c86c52

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

prdoc/pr_9731.prdoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
title: simulate `rank_to_votes` conversion in vote benchmark
2+
3+
doc:
4+
- audience: Runtime Dev
5+
description: |
6+
Fixes benchmarking failures for the vote extrinsic in pallet-ranked-collective by properly
7+
simulating the `rank_to_votes` conversion process. Previously used hardcoded vote values
8+
which caused assertion failures when using custom VoteWeight converters (e.g., in
9+
[Ambassador Collective configuration](https://github.com/polkadot-fellows/runtimes/pull/736)). The fix calculates vote weight based on member's
10+
actual rank and minimum required rank for the class.
11+
12+
crates:
13+
- name: pallet-ranked-collective
14+
bump: patch

0 commit comments

Comments
 (0)