From 76d147439a35446b893b39ffa15b677a518a06d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Thei=C3=9Fen?= Date: Thu, 15 Jul 2021 12:02:32 +0200 Subject: [PATCH] contracts: Way to many locals where generated for benchmarks (fixed that) (#9353) --- substrate/frame/contracts/src/benchmarking/code.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/substrate/frame/contracts/src/benchmarking/code.rs b/substrate/frame/contracts/src/benchmarking/code.rs index 6faba8a2e0..cd13e3be6d 100644 --- a/substrate/frame/contracts/src/benchmarking/code.rs +++ b/substrate/frame/contracts/src/benchmarking/code.rs @@ -508,7 +508,7 @@ pub mod body { /// Replace the locals of the supplied `body` with `num` i64 locals. pub fn inject_locals(body: &mut FuncBody, num: u32) { use self::elements::Local; - *body.locals_mut() = (0..num).map(|i| Local::new(i, ValueType::I64)).collect() + *body.locals_mut() = vec![Local::new(num, ValueType::I64)]; } }