mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 10:01:17 +00:00
Extend the lower bounds of some of the benchmarks to also include 0 (#12386)
* Extend the lower bounds of some of the benchmarks to also include `0` * Fix verify snippet for `pallet_bounties/spend_funds`
This commit is contained in:
@@ -197,7 +197,7 @@ benchmarks_instance_pallet! {
|
||||
}
|
||||
|
||||
spend_funds {
|
||||
let b in 1 .. 100;
|
||||
let b in 0 .. 100;
|
||||
setup_pot_account::<T, I>();
|
||||
create_approved_bounties::<T, I>(b)?;
|
||||
|
||||
@@ -214,9 +214,13 @@ benchmarks_instance_pallet! {
|
||||
);
|
||||
}
|
||||
verify {
|
||||
ensure!(budget_remaining < BalanceOf::<T, I>::max_value(), "Budget not used");
|
||||
ensure!(missed_any == false, "Missed some");
|
||||
assert_last_event::<T, I>(Event::BountyBecameActive { index: b - 1 }.into())
|
||||
if b > 0 {
|
||||
ensure!(budget_remaining < BalanceOf::<T, I>::max_value(), "Budget not used");
|
||||
assert_last_event::<T, I>(Event::BountyBecameActive { index: b - 1 }.into())
|
||||
} else {
|
||||
ensure!(budget_remaining == BalanceOf::<T, I>::max_value(), "Budget used");
|
||||
}
|
||||
}
|
||||
|
||||
impl_benchmark_test_suite!(Bounties, crate::tests::new_test_ext(), crate::tests::Test)
|
||||
|
||||
Reference in New Issue
Block a user