mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 04:35:41 +00:00
Pallet staking events to named enum (#12342)
* Pallet staking events to named enum * fmt * update np staking tests * update remaining events * update benchmarks * Update frame/nomination-pools/test-staking/src/lib.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> * Update frame/staking/src/pallet/mod.rs * Update frame/staking/src/pallet/mod.rs * Update frame/staking/src/lib.rs * Update frame/staking/src/pallet/impls.rs Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com> Co-authored-by: parity-processbot <> Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com>
This commit is contained in:
@@ -309,13 +309,13 @@ benchmarks! {
|
||||
let reward_amount = slash_amount.saturating_mul(1 + n) / 2;
|
||||
let reward = reward_amount / r;
|
||||
let slash = |id| core::iter::once(
|
||||
<T as StakingConfig>::RuntimeEvent::from(StakingEvent::<T>::Slashed(id, BalanceOf::<T>::from(slash_amount)))
|
||||
<T as StakingConfig>::RuntimeEvent::from(StakingEvent::<T>::Slashed{staker: id, amount: BalanceOf::<T>::from(slash_amount)})
|
||||
);
|
||||
let balance_slash = |id| core::iter::once(
|
||||
<T as BalancesConfig>::RuntimeEvent::from(pallet_balances::Event::<T>::Slashed{who: id, amount: slash_amount.into()})
|
||||
);
|
||||
let chill = |id| core::iter::once(
|
||||
<T as StakingConfig>::RuntimeEvent::from(StakingEvent::<T>::Chilled(id))
|
||||
<T as StakingConfig>::RuntimeEvent::from(StakingEvent::<T>::Chilled{stash: id})
|
||||
);
|
||||
let balance_deposit = |id, amount: u32|
|
||||
<T as BalancesConfig>::RuntimeEvent::from(pallet_balances::Event::<T>::Deposit{who: id, amount: amount.into()});
|
||||
|
||||
Reference in New Issue
Block a user