fix benchmarking for slow clap

Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
Uncle Stretch 2026-02-26 21:36:14 +03:00
parent bd8d7145af
commit b0a69493cd
Signed by: str3tch
GPG Key ID: 84F3190747EE79AA
4 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "ghost-slow-clap"
version = "0.4.25"
version = "0.4.26"
description = "Applause protocol for the EVM bridge"
license.workspace = true
authors.workspace = true

View File

@ -111,8 +111,8 @@ benchmarks! {
}
try_offend_validators {
let n in 4 .. T::MaxAuthorities::get();
let d in 0 .. T::MaxAuthorities::get().saturating_div(3);
let n in 1 .. T::MaxAuthorities::get();
let d in 0 .. T::MaxAuthorities::get();
let session_index = T::ValidatorSet::session_index();
let mut validators_vec = Vec::new();

View File

@ -1510,7 +1510,7 @@ impl<T: Config> Pallet<T> {
sp_runtime::print(e);
}
let extra_weight = T::WeightInfo::try_offend_validators(offenders_len);
let extra_weight = T::WeightInfo::try_offend_validators(validator_set_count, offenders_len);
weight.saturating_add(extra_weight)
}

View File

@ -49,7 +49,7 @@ use core::marker::PhantomData;
pub trait WeightInfo {
fn slow_clap() -> Weight;
fn commit_block()-> Weight;
fn try_offend_validators(offenders_len: u32) -> Weight;
fn try_offend_validators(validators_len: u32, offenders_len: u32) -> Weight;
}
impl WeightInfo for () {
@ -105,7 +105,7 @@ impl WeightInfo for () {
.saturating_add(RocksDbWeight::get().writes(1))
}
fn try_offend_validators(_offenders_len: u32) -> Weight {
fn try_offend_validators(_validators_len: u32, _offenders_len: u32) -> Weight {
Default::default()
}
}