From baac9bb367195daefe7ba21dbea0f73a0254d33f Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Thu, 5 Jan 2023 18:57:24 -0500 Subject: [PATCH] assume option (2) for now wrt https://github.com/paritytech/substrate/pull/12924#issuecomment-1372938718 --- frame/message-queue/src/benchmarking.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frame/message-queue/src/benchmarking.rs b/frame/message-queue/src/benchmarking.rs index 03609d60f000f..2fb70d713520f 100644 --- a/frame/message-queue/src/benchmarking.rs +++ b/frame/message-queue/src/benchmarking.rs @@ -46,7 +46,9 @@ benchmarks! { assert_ring::(&[0.into(), 2.into()]); #[extrinsic_call] - let neighbours = MessageQueue::::ready_ring_knit(&mid).ok(); + let neighbours = MessageQueue::::ready_ring_knit(&mid); + + neighbors.ok(); // The neighbours needs to be modified manually. BookStateFor::::mutate(&mid, |b| { b.ready_neighbours = neighbours }); @@ -187,8 +189,9 @@ benchmarks! { BookStateFor::::insert(&origin, &book); #[extrinsic_call] - MessageQueue::::execute_overweight(RawOrigin::Signed(whitelisted_caller()).into(), 0u32.into(), 0u32, ((msgs - 1) as u32).into(), Weight::MAX).unwrap(); + let call = MessageQueue::::execute_overweight(RawOrigin::Signed(whitelisted_caller()).into(), 0u32.into(), 0u32, ((msgs - 1) as u32).into(), Weight::MAX); + call.unwrap(); assert_last_event::(Event::Processed { hash: T::Hashing::hash(&((msgs - 1) as u32).encode()), origin: 0.into(), weight_used: Weight::from_parts(1, 1), success: true @@ -210,8 +213,9 @@ benchmarks! { BookStateFor::::insert(&origin, &book); #[extrinsic_call] - MessageQueue::::execute_overweight(RawOrigin::Signed(whitelisted_caller()).into(), 0u32.into(), 0u32, ((msgs - 1) as u32).into(), Weight::MAX).unwrap(); + let call = MessageQueue::::execute_overweight(RawOrigin::Signed(whitelisted_caller()).into(), 0u32.into(), 0u32, ((msgs - 1) as u32).into(), Weight::MAX); + call.unwrap(); assert_last_event::(Event::Processed { hash: T::Hashing::hash(&((msgs - 1) as u32).encode()), origin: 0.into(), weight_used: Weight::from_parts(1, 1), success: true