Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions prdoc/pr_8932.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title: 'pallet-balances: Do not create account in benchmarking'
doc:
- audience: Runtime Dev
description: |-
This particular benchmark is about benchmarking the account creation, so we should not create it before :)


Closes: https://github.com/paritytech/polkadot-sdk/issues/8927
crates:
- name: pallet-balances
bump: patch
2 changes: 0 additions & 2 deletions substrate/frame/balances/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,8 @@ mod benchmarks {
let user: T::AccountId = account("user", 0, SEED);
let user_lookup = T::Lookup::unlookup(user.clone());

// Give the user some initial balance.
let existential_deposit: T::Balance = minimum_balance::<T, I>();
let balance_amount = existential_deposit.saturating_mul(ED_MULTIPLIER.into());
let _ = <Balances<T, I> as Currency<_>>::make_free_balance_be(&user, balance_amount);

#[extrinsic_call]
force_set_balance(RawOrigin::Root, user_lookup, balance_amount);
Expand Down