From eed19a2a615da09f023d8a9971ab9d726b0da43e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Thu, 10 Dec 2020 23:02:35 +0100 Subject: [PATCH] Avoid too high values. --- frame/system/benchmarking/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frame/system/benchmarking/src/lib.rs b/frame/system/benchmarking/src/lib.rs index ae898a6ecaa83..080b1cd80f297 100644 --- a/frame/system/benchmarking/src/lib.rs +++ b/frame/system/benchmarking/src/lib.rs @@ -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)