Avoid too high values. (#7716)

This commit is contained in:
Tomasz Drwięga
2020-12-14 13:34:41 +01:00
committed by GitHub
parent 056e57e812
commit aa2191642f
@@ -28,6 +28,7 @@ use frame_benchmarking::{benchmarks, whitelisted_caller};
use frame_support::{
storage::{self, StorageMap},
traits::Get,
weights::DispatchClass,
};
use frame_system::{Module as System, Call, RawOrigin, DigestItemOf, AccountInfo};
@@ -40,7 +41,7 @@ benchmarks! {
_ { }
remark {
let b in 0 .. T::BlockWeights::get().max_block as u32;
let b in 0 .. *T::BlockLength::get().max.get(DispatchClass::Normal) as u32;
let remark_message = vec![1; b as usize];
let caller = whitelisted_caller();
}: _(RawOrigin::Signed(caller), remark_message)