Skip to content

Commit 13faac8

Browse files
pallet-balances: Do not create account in benchmarking (#8932)
This particular benchmark is about benchmarking the account creation, so we should not create it before :) Closes: #8927 --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> (cherry picked from commit 225d174)
1 parent 4c8549e commit 13faac8

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

prdoc/pr_8932.prdoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
title: 'pallet-balances: Do not create account in benchmarking'
2+
doc:
3+
- audience: Runtime Dev
4+
description: |-
5+
This particular benchmark is about benchmarking the account creation, so we should not create it before :)
6+
7+
8+
Closes: https://github.com/paritytech/polkadot-sdk/issues/8927
9+
crates:
10+
- name: pallet-balances
11+
bump: patch

substrate/frame/balances/src/benchmarking.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,8 @@ mod benchmarks {
127127
let user: T::AccountId = account("user", 0, SEED);
128128
let user_lookup = T::Lookup::unlookup(user.clone());
129129

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

135133
#[extrinsic_call]
136134
force_set_balance(RawOrigin::Root, user_lookup, balance_amount);

0 commit comments

Comments
 (0)