mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 09:17:58 +00:00
Move Staking Weights to T::WeightInfo (#7007)
* Fix the benchmarks * Migrate staking to weightInfo * Fix global benchmarks * re-calculate the submit solution weight. * Fix some refund. * Get rid of all the extra parameters. * Fix staking tests. * new values from the bench machine. * Fix some grumbles * better macro * Some better doc * Move to interpreted wasm * Make it work temporarily * Final fix of default ones. * Fix payout benchmarks * Fix payout stuff * One last fix * use benchmarking machine for numbers * update weight docs Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -35,7 +35,7 @@ use frame_system::RawOrigin;
|
||||
use pallet_session::{historical::Module as Historical, Module as Session, *};
|
||||
use pallet_staking::{
|
||||
benchmarking::create_validator_with_nominators, testing_utils::create_validators,
|
||||
MAX_NOMINATIONS,
|
||||
MAX_NOMINATIONS, RewardDestination,
|
||||
};
|
||||
use sp_runtime::traits::{One, StaticLookup};
|
||||
|
||||
@@ -55,7 +55,12 @@ benchmarks! {
|
||||
|
||||
set_keys {
|
||||
let n in 1 .. MAX_NOMINATIONS as u32;
|
||||
let v_stash = create_validator_with_nominators::<T>(n, MAX_NOMINATIONS as u32, false)?;
|
||||
let v_stash = create_validator_with_nominators::<T>(
|
||||
n,
|
||||
MAX_NOMINATIONS as u32,
|
||||
false,
|
||||
RewardDestination::Staked,
|
||||
)?;
|
||||
let v_controller = pallet_staking::Module::<T>::bonded(&v_stash).ok_or("not stash")?;
|
||||
let keys = T::Keys::default();
|
||||
let proof: Vec<u8> = vec![0,1,2,3];
|
||||
@@ -63,7 +68,7 @@ benchmarks! {
|
||||
|
||||
purge_keys {
|
||||
let n in 1 .. MAX_NOMINATIONS as u32;
|
||||
let v_stash = create_validator_with_nominators::<T>(n, MAX_NOMINATIONS as u32, false)?;
|
||||
let v_stash = create_validator_with_nominators::<T>(n, MAX_NOMINATIONS as u32, false, RewardDestination::Staked)?;
|
||||
let v_controller = pallet_staking::Module::<T>::bonded(&v_stash).ok_or("not stash")?;
|
||||
let keys = T::Keys::default();
|
||||
let proof: Vec<u8> = vec![0,1,2,3];
|
||||
|
||||
Reference in New Issue
Block a user