|
@@ -673,6 +673,7 @@ benchmarks! {
|
|
|
let funding_amount: BalanceOf<T> = 10000000u32.into();
|
|
|
let oracle = BountyActor::Council;
|
|
|
let entrant_stake: BalanceOf<T> = T::MinWorkEntrantStake::get();
|
|
|
+ let rationale = b"text".to_vec();
|
|
|
|
|
|
let params = BountyCreationParameters::<T> {
|
|
|
work_period,
|
|
@@ -709,7 +710,12 @@ benchmarks! {
|
|
|
|
|
|
run_to_block::<T>((work_period + One::one()).into());
|
|
|
|
|
|
- }: submit_oracle_judgment(RawOrigin::Root, oracle.clone(), bounty_id, judgment.clone())
|
|
|
+ }: submit_oracle_judgment(
|
|
|
+ RawOrigin::Root,
|
|
|
+ oracle.clone(),
|
|
|
+ bounty_id,
|
|
|
+ judgment.clone(),
|
|
|
+ rationale.clone())
|
|
|
verify {
|
|
|
for entry_id in entry_ids {
|
|
|
let entry = Bounty::<T>::entries(entry_id);
|
|
@@ -724,7 +730,7 @@ benchmarks! {
|
|
|
);
|
|
|
}
|
|
|
assert_last_event::<T>(
|
|
|
- Event::<T>::OracleJudgmentSubmitted(bounty_id, oracle, judgment).into()
|
|
|
+ Event::<T>::OracleJudgmentSubmitted(bounty_id, oracle, judgment, rationale).into()
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -736,6 +742,7 @@ benchmarks! {
|
|
|
let funding_amount: BalanceOf<T> = 100u32.into();
|
|
|
let oracle = BountyActor::Council;
|
|
|
let entrant_stake: BalanceOf<T> = T::MinWorkEntrantStake::get();
|
|
|
+ let rationale = b"text".to_vec();
|
|
|
|
|
|
let params = BountyCreationParameters::<T> {
|
|
|
work_period,
|
|
@@ -761,13 +768,18 @@ benchmarks! {
|
|
|
|
|
|
run_to_block::<T>((work_period + One::one()).into());
|
|
|
|
|
|
- }: submit_oracle_judgment(RawOrigin::Root, oracle.clone(), bounty_id, judgment.clone())
|
|
|
+ }: submit_oracle_judgment(
|
|
|
+ RawOrigin::Root,
|
|
|
+ oracle.clone(),
|
|
|
+ bounty_id,
|
|
|
+ judgment.clone(),
|
|
|
+ rationale.clone())
|
|
|
verify {
|
|
|
for entry_id in entry_ids {
|
|
|
assert!(!<Entries<T>>::contains_key(entry_id));
|
|
|
}
|
|
|
assert_last_event::<T>(
|
|
|
- Event::<T>::OracleJudgmentSubmitted(bounty_id, oracle, judgment).into()
|
|
|
+ Event::<T>::OracleJudgmentSubmitted(bounty_id, oracle, judgment, rationale).into()
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -781,6 +793,7 @@ benchmarks! {
|
|
|
let (oracle_account_id, oracle_member_id) = member_funded_account::<T>("oracle", 1);
|
|
|
let oracle = BountyActor::Member(oracle_member_id);
|
|
|
let entrant_stake: BalanceOf<T> = T::MinWorkEntrantStake::get();
|
|
|
+ let rationale = b"text".to_vec();
|
|
|
|
|
|
let params = BountyCreationParameters::<T> {
|
|
|
work_period,
|
|
@@ -821,8 +834,8 @@ benchmarks! {
|
|
|
RawOrigin::Signed(oracle_account_id),
|
|
|
oracle.clone(),
|
|
|
bounty_id,
|
|
|
- judgment.clone()
|
|
|
- )
|
|
|
+ judgment.clone(),
|
|
|
+ rationale.clone())
|
|
|
verify {
|
|
|
for entry_id in entry_ids {
|
|
|
let entry = Bounty::<T>::entries(entry_id);
|
|
@@ -837,7 +850,7 @@ benchmarks! {
|
|
|
);
|
|
|
}
|
|
|
assert_last_event::<T>(
|
|
|
- Event::<T>::OracleJudgmentSubmitted(bounty_id, oracle, judgment).into()
|
|
|
+ Event::<T>::OracleJudgmentSubmitted(bounty_id, oracle, judgment, rationale).into()
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -851,6 +864,7 @@ benchmarks! {
|
|
|
let (oracle_account_id, oracle_member_id) = member_funded_account::<T>("oracle", 1);
|
|
|
let oracle = BountyActor::Member(oracle_member_id);
|
|
|
let entrant_stake: BalanceOf<T> = T::MinWorkEntrantStake::get();
|
|
|
+ let rationale = b"text".to_vec();
|
|
|
|
|
|
let params = BountyCreationParameters::<T> {
|
|
|
work_period,
|
|
@@ -880,14 +894,14 @@ benchmarks! {
|
|
|
RawOrigin::Signed(oracle_account_id),
|
|
|
oracle.clone(),
|
|
|
bounty_id,
|
|
|
- judgment.clone()
|
|
|
- )
|
|
|
+ judgment.clone(),
|
|
|
+ rationale.clone())
|
|
|
verify {
|
|
|
for entry_id in entry_ids {
|
|
|
assert!(!<Entries<T>>::contains_key(entry_id));
|
|
|
}
|
|
|
assert_last_event::<T>(
|
|
|
- Event::<T>::OracleJudgmentSubmitted(bounty_id, oracle, judgment).into()
|
|
|
+ Event::<T>::OracleJudgmentSubmitted(bounty_id, oracle, judgment, rationale).into()
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -947,7 +961,8 @@ benchmarks! {
|
|
|
RawOrigin::Signed(oracle_account_id).into(),
|
|
|
oracle.clone(),
|
|
|
bounty_id,
|
|
|
- judgment.clone()
|
|
|
+ judgment.clone(),
|
|
|
+ Vec::new(),
|
|
|
).unwrap();
|
|
|
|
|
|
}: _ (RawOrigin::Signed(work_account_id), work_member_id, bounty_id, entry_id)
|