Skip to content
Snippets Groups Projects

Quota pallet benchmark

Compare and Show latest version
4 files
+ 47
12
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -108,4 +108,16 @@ assert_has_event::<T>(Event::<T>::RefundFailed ( account ).into());
verify {
assert_has_event::<T>(Event::<T>::RefundFailed ( account ).into());
}
process_refund_queue {
let account: T::AccountId = account("Alice", 1, 1);
let dummy_refund = Refund {
account: account.clone(),
identity: 0u32.into(),
amount: 20u64.into(),
};
// Worst case scenario: the queue is full, and the available weight is maximal.
for i in 0 .. MAX_QUEUED_REFUNDS {
Pallet::<T>::queue_refund(dummy_refund.clone())
}
}: { Pallet::<T>::process_refund_queue(Weight::MAX) }
}
Loading