Add support for feature `pallet_balances/insecure_zero_ed` in benchmarks and testing (#7379)
# Description
Currently benchmarks and tests on pallet_balances would fail when the
feature insecure_zero_ed is enabled. This PR allows to run such
benchmark and tests keeping into account the fact that accounts would
not be deleted when their balance goes below a threshold.
## Integration
*In depth notes about how this PR should be integrated by downstream
projects. This part is mandatory, and should be
reviewed by reviewers, if the PR does NOT have the `R0-Silent` label. In
case of a `R0-Silent`, it can be ignored.*
## Review Notes
*In depth notes about the **implementation** details of your PR. This
should be the main guide for reviewers to
understand your approach and effectively review it. If too long, use
[`<details>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details)*.
*Imagine that someone who is depending on the old code wants to
integrate your new code and the only information that
they get is this section. It helps to include example usage and default
value here, with a `diff` code-block to show
possibly integration.*
*Include your leftover TODOs, if any, here.*
# Checklist
* [x] My PR includes a detailed description as outlined in the
"Description" and its two subsections above.
* [x] My PR follows the [labeling requirements](
https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md#Process
) of this project (at minimum one label for `T` required)
* External contributors: ask maintainers to put the right label on your
PR.
* [x] I have made corresponding changes to the documentation (if
applicable)
* [x] I have added tests that prove my fix is effective or that my
feature works (if applicable)
You can remove the "Checklist" section once all have been checked. Thank
you for your contribution!
✄
-----------------------------------------------------------------------------
---------
Co-authored-by:
Rodrigo Quelhas <rodrigo_quelhas@outlook.pt>
parent
1d05b9a9
Showing
- prdoc/pr_7379.prdoc 13 additions, 0 deletionsprdoc/pr_7379.prdoc
- substrate/frame/balances/src/benchmarking.rs 25 additions, 6 deletionssubstrate/frame/balances/src/benchmarking.rs
- substrate/frame/balances/src/tests/currency_tests.rs 3 additions, 1 deletionsubstrate/frame/balances/src/tests/currency_tests.rs
Please register or sign in to comment