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

fix rococo-dev bench #5688

Merged
merged 2 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use super::*;
use crate::{inclusion, ParaId};
use alloc::collections::btree_map::BTreeMap;
use core::cmp::min;
use core::cmp::{max, min};
use frame_benchmarking::{benchmarks, impl_benchmark_test_suite};
use frame_system::RawOrigin;

Expand Down Expand Up @@ -107,7 +107,7 @@ benchmarks! {
// of a single backed candidate.
enter_backed_candidates_variable {
let v in (BenchBuilder::<T>::fallback_min_backing_votes())
..(BenchBuilder::<T>::fallback_max_validators_per_core());
.. max(BenchBuilder::<T>::fallback_min_backing_votes() + 1, BenchBuilder::<T>::fallback_max_validators_per_core());

let cores_with_backed: BTreeMap<_, _>
= vec![(0, v)] // The backed candidate will have `v` validity votes.
Expand Down
10 changes: 10 additions & 0 deletions prdoc/pr_5688.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title: "Fix `paras_inherent` benchmark"

doc:
- audience: Runtime Dev
description: |
Fixes the benchmark for relay chains like rococo-dev with `max_validators_per_core` value lower than 2.

crates:
- name: polkadot-runtime-parachains
bump: patch