fix benchmarking for slow clap
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
This commit is contained in:
parent
bd8d7145af
commit
b0a69493cd
@ -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
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user