Skip to content

Commit

Permalink
fix benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed Aug 9, 2024
1 parent 4636d75 commit 613d2da
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pallets/regions/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ mod benchmarks {
#[benchmark]
fn drop_region() -> Result<(), BenchmarkError> {
let caller: T::AccountId = whitelisted_caller();
let owner: T::AccountId = account("alice", 0, SEED);

let region_id = RegionId { begin: 1, core: 72, mask: CoreMask::complete() };
let record: RegionRecordOf<Test> = RegionRecord { end: 2, owner: 1, paid: None };
let record: RegionRecordOf<T> = RegionRecord { end: 2, owner, paid: None };

assert_ok!(crate::Pallet::<T>::mint_into(&region_id.into(), &caller));
assert_ok!(crate::Pallet::request_region_record(RawOrigin::None, region_id));
assert_ok!(crate::Pallet::set_record(region_id, record));
assert_ok!(crate::Pallet::<T>::request_region_record(RawOrigin::None.into(), region_id));
assert_ok!(crate::Pallet::<T>::set_record(region_id, record));

#[extrinsic_call]
_(RawOrigin::Signed(caller.clone()), region_id);
Expand Down

0 comments on commit 613d2da

Please sign in to comment.