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]
|
[package]
|
||||||
name = "ghost-slow-clap"
|
name = "ghost-slow-clap"
|
||||||
version = "0.4.25"
|
version = "0.4.26"
|
||||||
description = "Applause protocol for the EVM bridge"
|
description = "Applause protocol for the EVM bridge"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
|
|||||||
@ -111,8 +111,8 @@ benchmarks! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try_offend_validators {
|
try_offend_validators {
|
||||||
let n in 4 .. T::MaxAuthorities::get();
|
let n in 1 .. T::MaxAuthorities::get();
|
||||||
let d in 0 .. T::MaxAuthorities::get().saturating_div(3);
|
let d in 0 .. T::MaxAuthorities::get();
|
||||||
|
|
||||||
let session_index = T::ValidatorSet::session_index();
|
let session_index = T::ValidatorSet::session_index();
|
||||||
let mut validators_vec = Vec::new();
|
let mut validators_vec = Vec::new();
|
||||||
|
|||||||
@ -1510,7 +1510,7 @@ impl<T: Config> Pallet<T> {
|
|||||||
sp_runtime::print(e);
|
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)
|
weight.saturating_add(extra_weight)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -49,7 +49,7 @@ use core::marker::PhantomData;
|
|||||||
pub trait WeightInfo {
|
pub trait WeightInfo {
|
||||||
fn slow_clap() -> Weight;
|
fn slow_clap() -> Weight;
|
||||||
fn commit_block()-> 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 () {
|
impl WeightInfo for () {
|
||||||
@ -105,7 +105,7 @@ impl WeightInfo for () {
|
|||||||
.saturating_add(RocksDbWeight::get().writes(1))
|
.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()
|
Default::default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user