Skip to content

Commit 69af5ca

Browse files
authored
Avoid too high values. (#7716)
1 parent 7c78199 commit 69af5ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

benchmarking/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use frame_benchmarking::{benchmarks, whitelisted_caller};
2828
use frame_support::{
2929
storage::{self, StorageMap},
3030
traits::Get,
31+
weights::DispatchClass,
3132
};
3233
use frame_system::{Module as System, Call, RawOrigin, DigestItemOf, AccountInfo};
3334

@@ -40,7 +41,7 @@ benchmarks! {
4041
_ { }
4142

4243
remark {
43-
let b in 0 .. T::BlockWeights::get().max_block as u32;
44+
let b in 0 .. *T::BlockLength::get().max.get(DispatchClass::Normal) as u32;
4445
let remark_message = vec![1; b as usize];
4546
let caller = whitelisted_caller();
4647
}: _(RawOrigin::Signed(caller), remark_message)

0 commit comments

Comments
 (0)