mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 16:07:57 +00:00
Fix benchmarks and adds CI to test them (#12068)
* Fix benchmarks and adds CI to test them Instead of waiting for benchmarks failing in Polkadot CI, we also can just test them in Substrate :P * Do not overflow
This commit is contained in:
@@ -305,7 +305,7 @@ benchmarks! {
|
||||
verify {
|
||||
let bond_amount: u32 = UniqueSaturatedInto::<u32>::unique_saturated_into(bond_amount::<T>());
|
||||
let slash_amount = slash_fraction * bond_amount;
|
||||
let reward_amount = slash_amount * (1 + n) / 2;
|
||||
let reward_amount = slash_amount.saturating_mul(1 + n) / 2;
|
||||
let reward = reward_amount / r;
|
||||
let slash = |id| core::iter::once(
|
||||
<T as StakingConfig>::Event::from(StakingEvent::<T>::Slashed(id, BalanceOf::<T>::from(slash_amount)))
|
||||
|
||||
Reference in New Issue
Block a user