mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 22:41:06 +00:00
Minimum commission for validators (#10347)
* Minimum commission for validators * rename * Fix benchmakrs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs * Update frame/staking/src/pallet/mod.rs * cargo run --quiet --release --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_staking --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/staking/src/weights.rs --template=./.maintain/frame-weight-template.hbs Co-authored-by: Parity Bot <admin@parity.io> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -842,7 +842,7 @@ benchmarks! {
|
||||
assert_eq!(targets.len() as u32, v);
|
||||
}
|
||||
|
||||
set_staking_limits {
|
||||
set_staking_configs {
|
||||
// This function always does the same thing... just write to 4 storage items.
|
||||
}: _(
|
||||
RawOrigin::Root,
|
||||
@@ -850,13 +850,15 @@ benchmarks! {
|
||||
BalanceOf::<T>::max_value(),
|
||||
Some(u32::MAX),
|
||||
Some(u32::MAX),
|
||||
Some(Percent::max_value())
|
||||
Some(Percent::max_value()),
|
||||
Perbill::max_value()
|
||||
) verify {
|
||||
assert_eq!(MinNominatorBond::<T>::get(), BalanceOf::<T>::max_value());
|
||||
assert_eq!(MinValidatorBond::<T>::get(), BalanceOf::<T>::max_value());
|
||||
assert_eq!(MaxNominatorsCount::<T>::get(), Some(u32::MAX));
|
||||
assert_eq!(MaxValidatorsCount::<T>::get(), Some(u32::MAX));
|
||||
assert_eq!(ChillThreshold::<T>::get(), Some(Percent::from_percent(100)));
|
||||
assert_eq!(MinCommission::<T>::get(), Perbill::from_percent(100));
|
||||
}
|
||||
|
||||
chill_other {
|
||||
@@ -872,13 +874,14 @@ benchmarks! {
|
||||
let stash = scenario.origin_stash1.clone();
|
||||
assert!(T::SortedListProvider::contains(&stash));
|
||||
|
||||
Staking::<T>::set_staking_limits(
|
||||
Staking::<T>::set_staking_configs(
|
||||
RawOrigin::Root.into(),
|
||||
BalanceOf::<T>::max_value(),
|
||||
BalanceOf::<T>::max_value(),
|
||||
Some(0),
|
||||
Some(0),
|
||||
Some(Percent::from_percent(0))
|
||||
Some(Percent::from_percent(0)),
|
||||
Zero::zero(),
|
||||
)?;
|
||||
|
||||
let caller = whitelisted_caller();
|
||||
|
||||
Reference in New Issue
Block a user