Skip to content
Snippets Groups Projects

Quota pallet benchmark

Compare and Show latest version
2 files
+ 22
27
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -31,7 +31,6 @@ benchmarks! {
BalanceOf<T>: From<u64>,
T::AccountId: From<[u8; 32]>,
}
#[pov_mode = Measured]
queue_refund {
let account: T::AccountId = account("Alice", 1, 1);
let dummy_refund = Refund {
@@ -53,7 +52,6 @@ benchmarks! {
assert_eq!(RefundQueue::<T>::get().last(), Some(refund).as_ref());
assert_eq!(RefundQueue::<T>::get().len() as u32, MAX_QUEUED_REFUNDS);
}
#[pov_mode = Measured]
spend_quota {
let idty_id: IdtyId<T> = 1u32.into();
let amount = 2u64;
@@ -73,7 +71,6 @@ benchmarks! {
).mul_floor(T::MaxQuota::get());
assert_eq!(IdtyQuota::<T>::get(idty_id).unwrap().amount, quota_growth +quota_amount.into() - amount.into());
}
#[pov_mode = Measured]
try_refund {
let account: T::AccountId = account("Alice", 1, 1);
let idty_id: IdtyId<T> = 1u32.into();
@@ -99,7 +96,6 @@ benchmarks! {
verify {
assert_has_event::<T>(Event::<T>::RefundFailed ( account ).into());
}
#[pov_mode = Measured]
do_refund {
let account: T::AccountId = account("Alice", 1, 1);
let _ = CurrencyOf::<T>:: make_free_balance_be(
@@ -118,7 +114,6 @@ benchmarks! {
assert_has_event::<T>(Event::<T>::RefundFailed ( account ).into());
}
// The base weight consumed on processing refund queue when empty.
#[pov_mode = Measured]
on_process_refund_queue {
assert_eq!(RefundQueue::<T>::get().len() as u32, 0);
}: { Pallet::<T>::process_refund_queue(Weight::MAX) }
Loading