Fix refund benchmark for pallet_assets (#14561)

* Fix refund benchmark for pallet_assets

* Update frame/assets/src/benchmarking.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Re-added docs

* Another "fix"

---------

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: parity-processbot <>
This commit is contained in:
Branislav Kontur
2023-07-12 15:41:46 +02:00
committed by GitHub
parent 474b773a6c
commit d3c42b2e8d
+4 -4
View File
@@ -514,8 +514,8 @@ benchmarks_instance_pallet! {
SystemOrigin::Signed(new_account.clone()).into(),
asset_id
).is_ok());
// `touch` should reserve some balance of the caller...
assert!(!T::Currency::reserved_balance(&new_account).is_zero());
// `touch` should reserve balance of the caller according to the `AssetAccountDeposit` amount...
assert_eq!(T::Currency::reserved_balance(&new_account), T::AssetAccountDeposit::get());
// ...and also create an `Account` entry.
assert!(Account::<T, I>::contains_key(asset_id.into(), &new_account));
}: _(SystemOrigin::Signed(new_account.clone()), asset_id, true)
@@ -535,8 +535,8 @@ benchmarks_instance_pallet! {
asset_id,
new_account_lookup.clone()
).is_ok());
// `touch_other` should reserve balance of the freezer
assert!(!T::Currency::reserved_balance(&asset_owner).is_zero());
// `touch` should reserve balance of the caller according to the `AssetAccountDeposit` amount...
assert_eq!(T::Currency::reserved_balance(&asset_owner), T::AssetAccountDeposit::get());
assert!(Account::<T, I>::contains_key(asset_id.into(), &new_account));
}: _(SystemOrigin::Signed(asset_owner.clone()), asset_id, new_account_lookup.clone())
verify {