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

Commit

Permalink
Fix refund benchmark for pallet_assets (#14561)
Browse files Browse the repository at this point in the history
* 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 <>
  • Loading branch information
bkontur and joepetrowski authored Jul 12, 2023
1 parent d6e9c57 commit 7b5a4d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frame/assets/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 {
Expand Down

0 comments on commit 7b5a4d2

Please sign in to comment.