Skip to content
Unverified Commit a9aeabe9 authored by Kris Bitney's avatar Kris Bitney Committed by GitHub
Browse files

Allow for 0 existential deposit in benchmarks for `pallet_staking`,...


Allow for 0 existential deposit in benchmarks for `pallet_staking`, `pallet_session`, and `pallet_balances` (#4346)

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: default avatarBastian Köcher <[email protected]>
parent 6580101e
Pipeline #471763 failed with stages
in 1 hour, 15 minutes, and 11 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment