|
@@ -74,8 +74,8 @@ benchmarks! {
|
|
assert_last_event::<T>(RawEvent::Signaled(signal).into());
|
|
assert_last_event::<T>(RawEvent::Signaled(signal).into());
|
|
}
|
|
}
|
|
|
|
|
|
- update_working_group_budget_positive_forum {
|
|
|
|
- set_wg_and_council_budget::<T>(100, WorkingGroup::Forum);
|
|
|
|
|
|
+ update_working_group_budget_positive {
|
|
|
|
+ set_wg_and_council_budget::<T>(100, WorkingGroup::Forum); // All groups are similar
|
|
}: update_working_group_budget(
|
|
}: update_working_group_budget(
|
|
RawOrigin::Root,
|
|
RawOrigin::Root,
|
|
WorkingGroup::Forum,
|
|
WorkingGroup::Forum,
|
|
@@ -86,8 +86,8 @@ benchmarks! {
|
|
assert_new_budgets::<T>(99, 101, WorkingGroup::Forum, 1, BalanceKind::Positive);
|
|
assert_new_budgets::<T>(99, 101, WorkingGroup::Forum, 1, BalanceKind::Positive);
|
|
}
|
|
}
|
|
|
|
|
|
- update_working_group_budget_negative_forum {
|
|
|
|
- set_wg_and_council_budget::<T>(100, WorkingGroup::Forum);
|
|
|
|
|
|
+ update_working_group_budget_negative {
|
|
|
|
+ set_wg_and_council_budget::<T>(100, WorkingGroup::Forum); // All groups are similar
|
|
}: update_working_group_budget(
|
|
}: update_working_group_budget(
|
|
RawOrigin::Root,
|
|
RawOrigin::Root,
|
|
WorkingGroup::Forum,
|
|
WorkingGroup::Forum,
|
|
@@ -98,74 +98,6 @@ benchmarks! {
|
|
assert_new_budgets::<T>(101, 99, WorkingGroup::Forum, 1, BalanceKind::Negative);
|
|
assert_new_budgets::<T>(101, 99, WorkingGroup::Forum, 1, BalanceKind::Negative);
|
|
}
|
|
}
|
|
|
|
|
|
- update_working_group_budget_positive_storage {
|
|
|
|
- set_wg_and_council_budget::<T>(100, WorkingGroup::Storage);
|
|
|
|
- }: update_working_group_budget(
|
|
|
|
- RawOrigin::Root,
|
|
|
|
- WorkingGroup::Storage,
|
|
|
|
- One::one(),
|
|
|
|
- BalanceKind::Positive
|
|
|
|
- )
|
|
|
|
- verify {
|
|
|
|
- assert_new_budgets::<T>(99, 101, WorkingGroup::Storage, 1, BalanceKind::Positive);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- update_working_group_budget_negative_storage {
|
|
|
|
- set_wg_and_council_budget::<T>(100, WorkingGroup::Storage);
|
|
|
|
- }: update_working_group_budget(
|
|
|
|
- RawOrigin::Root,
|
|
|
|
- WorkingGroup::Storage,
|
|
|
|
- One::one(),
|
|
|
|
- BalanceKind::Negative
|
|
|
|
- )
|
|
|
|
- verify {
|
|
|
|
- assert_new_budgets::<T>(101, 99, WorkingGroup::Storage, 1, BalanceKind::Negative);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- update_working_group_budget_positive_content {
|
|
|
|
- set_wg_and_council_budget::<T>(100, WorkingGroup::Content);
|
|
|
|
- }: update_working_group_budget(
|
|
|
|
- RawOrigin::Root,
|
|
|
|
- WorkingGroup::Content,
|
|
|
|
- One::one(),
|
|
|
|
- BalanceKind::Positive
|
|
|
|
- )
|
|
|
|
- verify {
|
|
|
|
- assert_new_budgets::<T>(99, 101, WorkingGroup::Content, 1, BalanceKind::Positive);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- update_working_group_budget_negative_content {
|
|
|
|
- set_wg_and_council_budget::<T>(100, WorkingGroup::Content);
|
|
|
|
- }: update_working_group_budget(RawOrigin::Root, WorkingGroup::Content, One::one(),
|
|
|
|
- BalanceKind::Negative)
|
|
|
|
- verify {
|
|
|
|
- assert_new_budgets::<T>(101, 99, WorkingGroup::Content, 1, BalanceKind::Negative);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- update_working_group_budget_positive_membership {
|
|
|
|
- set_wg_and_council_budget::<T>(100, WorkingGroup::Membership);
|
|
|
|
- }: update_working_group_budget(
|
|
|
|
- RawOrigin::Root,
|
|
|
|
- WorkingGroup::Membership,
|
|
|
|
- One::one(),
|
|
|
|
- BalanceKind::Positive
|
|
|
|
- )
|
|
|
|
- verify {
|
|
|
|
- assert_new_budgets::<T>(99, 101, WorkingGroup::Membership, 1, BalanceKind::Positive);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- update_working_group_budget_negative_membership {
|
|
|
|
- set_wg_and_council_budget::<T>(100, WorkingGroup::Membership);
|
|
|
|
- }: update_working_group_budget(
|
|
|
|
- RawOrigin::Root,
|
|
|
|
- WorkingGroup::Membership,
|
|
|
|
- One::one(),
|
|
|
|
- BalanceKind::Negative
|
|
|
|
- )
|
|
|
|
- verify {
|
|
|
|
- assert_new_budgets::<T>(101, 99, WorkingGroup::Membership, 1, BalanceKind::Negative);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
burn_account_tokens {
|
|
burn_account_tokens {
|
|
let account_id = account::<T::AccountId>("caller", 0, 0);
|
|
let account_id = account::<T::AccountId>("caller", 0, 0);
|
|
let initial_issuance = Balances::<T>::total_issuance();
|
|
let initial_issuance = Balances::<T>::total_issuance();
|
|
@@ -196,62 +128,16 @@ mod tests {
|
|
}
|
|
}
|
|
|
|
|
|
#[test]
|
|
#[test]
|
|
- fn test_update_working_group_budget_positive_forum() {
|
|
|
|
- initial_test_ext().execute_with(|| {
|
|
|
|
- assert_ok!(test_benchmark_update_working_group_budget_positive_forum::<
|
|
|
|
- Test,
|
|
|
|
- >());
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- #[test]
|
|
|
|
- fn test_update_working_group_budget_negative_forum() {
|
|
|
|
- initial_test_ext().execute_with(|| {
|
|
|
|
- assert_ok!(test_benchmark_update_working_group_budget_negative_forum::<
|
|
|
|
- Test,
|
|
|
|
- >());
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- #[test]
|
|
|
|
- fn test_update_working_group_budget_positive_storage() {
|
|
|
|
- initial_test_ext().execute_with(|| {
|
|
|
|
- assert_ok!(test_benchmark_update_working_group_budget_positive_storage::<Test>());
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- #[test]
|
|
|
|
- fn test_update_working_group_budget_negative_storage() {
|
|
|
|
- initial_test_ext().execute_with(|| {
|
|
|
|
- assert_ok!(test_benchmark_update_working_group_budget_negative_storage::<Test>());
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- #[test]
|
|
|
|
- fn test_update_working_group_budget_positive_content() {
|
|
|
|
- initial_test_ext().execute_with(|| {
|
|
|
|
- assert_ok!(test_benchmark_update_working_group_budget_positive_content::<Test>());
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- #[test]
|
|
|
|
- fn test_update_working_group_budget_negative_content() {
|
|
|
|
- initial_test_ext().execute_with(|| {
|
|
|
|
- assert_ok!(test_benchmark_update_working_group_budget_negative_content::<Test>());
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- #[test]
|
|
|
|
- fn test_update_working_group_budget_positive_membership() {
|
|
|
|
|
|
+ fn test_update_working_group_budget_positive() {
|
|
initial_test_ext().execute_with(|| {
|
|
initial_test_ext().execute_with(|| {
|
|
- assert_ok!(test_benchmark_update_working_group_budget_positive_membership::<Test>());
|
|
|
|
|
|
+ assert_ok!(test_benchmark_update_working_group_budget_positive::<Test>());
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
#[test]
|
|
#[test]
|
|
- fn test_update_working_group_budget_negative_membership() {
|
|
|
|
|
|
+ fn test_update_working_group_budget_negative() {
|
|
initial_test_ext().execute_with(|| {
|
|
initial_test_ext().execute_with(|| {
|
|
- assert_ok!(test_benchmark_update_working_group_budget_negative_membership::<Test>());
|
|
|
|
|
|
+ assert_ok!(test_benchmark_update_working_group_budget_negative::<Test>());
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|