Commit a9aeabe
Allow for 0 existential deposit in benchmarks for
This PR ensures non-zero values are available in benchmarks for
`pallet_staking`, `pallet_session`, and `pallet_balances` where required
for them to run.
This small change makes it possible to run the benchmarks for
`pallet_staking`, `pallet_session`, and `pallet_balances` in a runtime
for which existential deposit is set to 0.
The benchmarks for `pallet_staking` and `pallet_session` will still fail
in runtimes that use `U128CurrencyToVote`, but that is easy to work
around by creating a new `CurrencyToVote` implementation for
benchmarking.
The changes are implemented by checking if existential deposit equals 0
and using 1 if so.
---------
Co-authored-by: command-bot <>
Co-authored-by: Bastian Köcher <[email protected]>pallet_staking, pallet_session, and pallet_balances (#4346)1 parent 6580101 commit a9aeabe
3 files changed
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
0 commit comments