Skip to content

Commit

Permalink
Fix for pallet_assets::create benchmark (paritytech#14384)
Browse files Browse the repository at this point in the history
* Fix for `pallet_assets::create` benchmark

* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet-assets

---------

Co-authored-by: command-bot <>
  • Loading branch information
bkontur authored and nathanwhit committed Jul 19, 2023
1 parent f9c1731 commit 0cd8efc
Show file tree
Hide file tree
Showing 2 changed files with 158 additions and 162 deletions.
4 changes: 2 additions & 2 deletions frame/assets/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ benchmarks_instance_pallet! {
let asset_id = default_asset_id::<T, I>();
let origin = T::CreateOrigin::try_successful_origin(&asset_id.into())
.map_err(|_| BenchmarkError::Weightless)?;
let caller = T::CreateOrigin::ensure_origin(origin, &asset_id.into()).unwrap();
let caller = T::CreateOrigin::ensure_origin(origin.clone(), &asset_id.into()).unwrap();
let caller_lookup = T::Lookup::unlookup(caller.clone());
T::Currency::make_free_balance_be(&caller, DepositBalanceOf::<T, I>::max_value());
}: _(SystemOrigin::Signed(caller.clone()), asset_id.clone(), caller_lookup, 1u32.into())
}: _<T::RuntimeOrigin>(origin, asset_id.clone(), caller_lookup, 1u32.into())
verify {
assert_last_event::<T, I>(Event::Created { asset_id: asset_id.into(), creator: caller.clone(), owner: caller }.into());
}
Expand Down
Loading

0 comments on commit 0cd8efc

Please sign in to comment.