Skip to content
Snippets Groups Projects
Commit 4057ef15 authored by Branislav Kontur's avatar Branislav Kontur Committed by GitHub
Browse files

Fix for `pallet_assets::create` benchmark (#14384)

* Fix for `pallet_assets::create` benchmark

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

---------

Co-authored-by: command-bot <>
parent 52a0910c
No related merge requests found
......@@ -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());
}
......
This diff is collapsed.
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment