mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-07 18:58:01 +00:00
Hotfix NIS benchmark (#13651)
* Hotfix NIS rounding error Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Also fix communal Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
1dd0dfb319
commit
dda99e9ca9
@@ -164,6 +164,9 @@ benchmarks! {
|
||||
Nis::<T>::place_bid(RawOrigin::Signed(caller.clone()).into(), bid, 1)?;
|
||||
Nis::<T>::process_queues(Perquintill::one(), 1, 2, &mut WeightCounter::unlimited());
|
||||
frame_system::Pallet::<T>::set_block_number(Receipts::<T>::get(0).unwrap().expiry);
|
||||
// FIXME: Ensure that the pallet has enough funding. This should already be the case, but
|
||||
// a rounding error can cause it to fail.
|
||||
T::Currency::set_balance(&Nis::<T>::account_id(), BalanceOf::<T>::max_value() / 10u32.into());
|
||||
}: _(RawOrigin::Signed(caller.clone()), 0, None)
|
||||
verify {
|
||||
assert!(Receipts::<T>::get(0).is_none());
|
||||
@@ -182,6 +185,9 @@ benchmarks! {
|
||||
Nis::<T>::process_queues(Perquintill::one(), 1, 2, &mut WeightCounter::unlimited());
|
||||
frame_system::Pallet::<T>::set_block_number(Receipts::<T>::get(0).unwrap().expiry);
|
||||
Nis::<T>::communify(RawOrigin::Signed(caller.clone()).into(), 0)?;
|
||||
// FIXME: Ensure that the pallet has enough funding. This should already be the case, but
|
||||
// a rounding error can cause it to fail.
|
||||
T::Currency::set_balance(&Nis::<T>::account_id(), BalanceOf::<T>::max_value() / 10u32.into());
|
||||
}: _(RawOrigin::Signed(caller.clone()), 0)
|
||||
verify {
|
||||
assert!(Receipts::<T>::get(0).is_none());
|
||||
|
||||
Reference in New Issue
Block a user