From 2890e2bff1f57de59130f42a336eb4c320527abd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Sun, 22 Jun 2025 23:36:56 +0200 Subject: [PATCH 1/2] pallet-balances: Do not create account in benchmarking This particular benchmark is about benchmarking the account creation, so we should not create it before :) --- substrate/frame/balances/src/benchmarking.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/substrate/frame/balances/src/benchmarking.rs b/substrate/frame/balances/src/benchmarking.rs index a761f8e2af828..d26660ac88e5c 100644 --- a/substrate/frame/balances/src/benchmarking.rs +++ b/substrate/frame/balances/src/benchmarking.rs @@ -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::(); let balance_amount = existential_deposit.saturating_mul(ED_MULTIPLIER.into()); - let _ = as Currency<_>>::make_free_balance_be(&user, balance_amount); #[extrinsic_call] force_set_balance(RawOrigin::Root, user_lookup, balance_amount); From 2faa41cf4950ebae2b4878e90cfa7f83e44c39ee Mon Sep 17 00:00:00 2001 From: "cmd[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 08:01:01 +0000 Subject: [PATCH 2/2] Update from github-actions[bot] running command 'prdoc --audience runtime_dev --bump patch' --- prdoc/pr_8932.prdoc | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 prdoc/pr_8932.prdoc diff --git a/prdoc/pr_8932.prdoc b/prdoc/pr_8932.prdoc new file mode 100644 index 0000000000000..771a8d603cef4 --- /dev/null +++ b/prdoc/pr_8932.prdoc @@ -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