Dont use benchmark range on constant functions (#12456)

* dont use benchmark range on constant function

* update weights

* fix

* new weights

* Update frame/examples/basic/src/benchmarking.rs

Co-authored-by: parity-processbot <>
This commit is contained in:
Shawn Tabrizi
2022-10-12 12:32:10 -04:00
committed by GitHub
parent 09748f1b28
commit b38c4165a4
3 changed files with 46 additions and 51 deletions
+1 -1
View File
@@ -498,7 +498,7 @@ pub mod pallet {
// The weight for this extrinsic we rely on the auto-generated `WeightInfo` from the
// benchmark toolchain.
#[pallet::weight(
<T as pallet::Config>::WeightInfo::accumulate_dummy((*increase_by).saturated_into())
<T as pallet::Config>::WeightInfo::accumulate_dummy()
)]
pub fn accumulate_dummy(origin: OriginFor<T>, increase_by: T::Balance) -> DispatchResult {
// This is a public call, so we ensure that the origin is some signed account.