Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
assume option (2) for now wrt #12924 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
sam0x17 committed Jan 8, 2023
1 parent 8e16c62 commit baac9bb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions frame/message-queue/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ benchmarks! {
assert_ring::<T>(&[0.into(), 2.into()]);

#[extrinsic_call]
let neighbours = MessageQueue::<T>::ready_ring_knit(&mid).ok();
let neighbours = MessageQueue::<T>::ready_ring_knit(&mid);

neighbors.ok();

// The neighbours needs to be modified manually.
BookStateFor::<T>::mutate(&mid, |b| { b.ready_neighbours = neighbours });
Expand Down Expand Up @@ -187,8 +189,9 @@ benchmarks! {
BookStateFor::<T>::insert(&origin, &book);

#[extrinsic_call]
MessageQueue::<T>::execute_overweight(RawOrigin::Signed(whitelisted_caller()).into(), 0u32.into(), 0u32, ((msgs - 1) as u32).into(), Weight::MAX).unwrap();
let call = MessageQueue::<T>::execute_overweight(RawOrigin::Signed(whitelisted_caller()).into(), 0u32.into(), 0u32, ((msgs - 1) as u32).into(), Weight::MAX);

call.unwrap();
assert_last_event::<T>(Event::Processed {
hash: T::Hashing::hash(&((msgs - 1) as u32).encode()), origin: 0.into(),
weight_used: Weight::from_parts(1, 1), success: true
Expand All @@ -210,8 +213,9 @@ benchmarks! {
BookStateFor::<T>::insert(&origin, &book);

#[extrinsic_call]
MessageQueue::<T>::execute_overweight(RawOrigin::Signed(whitelisted_caller()).into(), 0u32.into(), 0u32, ((msgs - 1) as u32).into(), Weight::MAX).unwrap();
let call = MessageQueue::<T>::execute_overweight(RawOrigin::Signed(whitelisted_caller()).into(), 0u32.into(), 0u32, ((msgs - 1) as u32).into(), Weight::MAX);

call.unwrap();
assert_last_event::<T>(Event::Processed {
hash: T::Hashing::hash(&((msgs - 1) as u32).encode()), origin: 0.into(),
weight_used: Weight::from_parts(1, 1), success: true
Expand Down

0 comments on commit baac9bb

Please sign in to comment.