Skip to content

Commit 56d14e0

Browse files
committed
Last fixes
1 parent 326f6cf commit 56d14e0

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

runtimes/peregrine/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,14 +574,16 @@ impl pallet_membership::Config<TechnicalMembershipProvider> for Runtime {
574574
pub struct MockMembershipChangedForBenchmarks;
575575

576576
impl ChangeMembers<AccountId> for MockMembershipChangedForBenchmarks {
577-
fn change_members_sorted(_incoming: &[AccountId], _outgoing: &[AccountId], _sorted_new: &[AccountId]) {}
577+
fn change_members_sorted(incoming: &[AccountId], outgoing: &[AccountId], sorted_new: &[AccountId]) {
578+
<()>::change_members_sorted(incoming, outgoing, sorted_new)
579+
}
578580

579581
fn get_prime() -> Option<AccountId> {
580582
cfg_if! {
581583
if #[cfg(feature = "runtime-benchmark")] {
582584
Some(AccountId::new([0; 32]))
583585
} else {
584-
pallet_membership::Prime::<Runtime, TipsMembershipProvider>::get()
586+
<()>::get_prime()
585587
}
586588
}
587589
}

runtimes/spiritnet/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,14 +567,16 @@ impl pallet_membership::Config<TechnicalMembershipProvider> for Runtime {
567567
pub struct MockMembershipChangedForBenchmarks;
568568

569569
impl ChangeMembers<AccountId> for MockMembershipChangedForBenchmarks {
570-
fn change_members_sorted(_incoming: &[AccountId], _outgoing: &[AccountId], _sorted_new: &[AccountId]) {}
570+
fn change_members_sorted(incoming: &[AccountId], outgoing: &[AccountId], sorted_new: &[AccountId]) {
571+
<()>::change_members_sorted(incoming, outgoing, sorted_new)
572+
}
571573

572574
fn get_prime() -> Option<AccountId> {
573575
cfg_if! {
574576
if #[cfg(feature = "runtime-benchmark")] {
575577
Some(AccountId::new([0; 32]))
576578
} else {
577-
pallet_membership::Prime::<Runtime, TipsMembershipProvider>::get()
579+
<()>::get_prime()
578580
}
579581
}
580582
}

scripts/run_benches_for_runtime.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ pallets=(
5656
pallet-web3-names
5757
)
5858

59-
# # Add Peregrine-only pallets here!
60-
# if [ "$runtime" = "peregrine" ]; then
61-
# pallets+=(
62-
# pallet-sudo
63-
# )
64-
# fi
59+
# Add Peregrine-only pallets here!
60+
if [ "$runtime" = "peregrine" ]; then
61+
pallets+=(
62+
pallet-sudo
63+
)
64+
fi
6565

6666
echo "[+] Running all runtime benchmarks for \"$runtime\", \"--chain=$chain\" and profile \"$profile\""
6767

@@ -70,7 +70,7 @@ cargo build $standard_args
7070
if [ $profile == "dev" ]; then
7171
target_folder="debug"
7272
# We care about benchmark correctness, not accuracy.
73-
additional_args="--header=HEADER-GPL --template=.maintain/runtime-weight-template.hbs --output=./runtimes/${runtime}/src/weights/"
73+
additional_args="--steps=2 --repeat=1 --default-pov-mode=ignored --no-verify"
7474
else
7575
target_folder=$profile
7676
additional_args="--header=HEADER-GPL --template=.maintain/runtime-weight-template.hbs --output=./runtimes/${runtime}/src/weights/"

0 commit comments

Comments
 (0)