File tree Expand file tree Collapse file tree
polkadot/runtime/parachains/src/paras_inherent Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717use super :: * ;
1818use crate :: { inclusion, ParaId } ;
1919use alloc:: collections:: btree_map:: BTreeMap ;
20- use core:: cmp:: min;
20+ use core:: cmp:: { max , min} ;
2121use frame_benchmarking:: { benchmarks, impl_benchmark_test_suite} ;
2222use frame_system:: RawOrigin ;
2323
@@ -107,7 +107,7 @@ benchmarks! {
107107 // of a single backed candidate.
108108 enter_backed_candidates_variable {
109109 let v in ( BenchBuilder :: <T >:: fallback_min_backing_votes( ) )
110- ..( BenchBuilder :: <T >:: fallback_max_validators_per_core( ) ) ;
110+ .. max ( BenchBuilder :: < T > :: fallback_min_backing_votes ( ) + 1 , BenchBuilder :: <T >:: fallback_max_validators_per_core( ) ) ;
111111
112112 let cores_with_backed: BTreeMap <_, _>
113113 = vec![ ( 0 , v) ] // The backed candidate will have `v` validity votes.
Original file line number Diff line number Diff line change 1+ title: "Fix `paras_inherent` benchmark"
2+
3+ doc:
4+ - audience: Runtime Dev
5+ description: |
6+ Fixes the benchmark for relay chains like rococo-dev with `max_validators_per_core` value lower than 2.
7+
8+ crates:
9+ - name: polkadot-runtime-parachains
10+ bump: patch
You can’t perform that action at this time.
0 commit comments