Skip to content

Commit

Permalink
♻️ small additional decesion cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vstam1 committed Jul 15, 2024
1 parent bcd1f6b commit a00641a
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 16 deletions.
5 changes: 1 addition & 4 deletions pallets/funding/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2280,7 +2280,7 @@ mod benchmarks {

// * validity checks *
let project_details = inst.get_project_details(project_id);
assert_eq!(project_details.status, ProjectStatus::AwaitingProjectDecision);

assert_eq!(project_details.evaluation_round_info.evaluators_outcome, EvaluatorsOutcome::Slashed)
}
#[benchmark]
Expand Down Expand Up @@ -2338,7 +2338,6 @@ mod benchmarks {

// * validity checks *
let project_details = inst.get_project_details(project_id);
assert_eq!(project_details.status, ProjectStatus::AwaitingProjectDecision);
assert_eq!(project_details.evaluation_round_info.evaluators_outcome, EvaluatorsOutcome::Unchanged)
}
#[benchmark]
Expand Down Expand Up @@ -2455,8 +2454,6 @@ mod benchmarks {
vec![],
);

assert_eq!(inst.get_project_details(project_id).status, ProjectStatus::AwaitingProjectDecision);

#[block]
{
Pallet::<T>::do_project_decision(project_id, FundingOutcomeDecision::AcceptFunding).unwrap();
Expand Down
3 changes: 1 addition & 2 deletions pallets/funding/src/instantiator/chain_interactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,7 @@ impl<
matches!(
project_details.status,
ProjectStatus::FundingSuccessful |
ProjectStatus::FundingFailed |
ProjectStatus::AwaitingProjectDecision
ProjectStatus::FundingFailed
),
"Project should be in Finished status"
);
Expand Down
6 changes: 0 additions & 6 deletions pallets/funding/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -985,12 +985,6 @@ pub mod pallet {
#[pallet::weight(WeightInfoOf::<T>::end_funding_automatically_rejected_evaluators_slashed(
1,
)
.max(WeightInfoOf::<T>::end_funding_awaiting_decision_evaluators_slashed(
1,
))
.max(WeightInfoOf::<T>::end_funding_awaiting_decision_evaluators_unchanged(
1,
))
.max(WeightInfoOf::<T>::end_funding_automatically_accepted_evaluators_rewarded(
1,
<T as Config>::MaxEvaluationsPerProject::get(),
Expand Down
2 changes: 0 additions & 2 deletions pallets/funding/src/tests/4_community.rs
Original file line number Diff line number Diff line change
Expand Up @@ -981,8 +981,6 @@ mod contribute_extrinsic {
inst.start_remainder_or_end_funding(project_id).unwrap();
inst.finish_funding(project_id).unwrap();

assert_eq!(inst.get_project_details(project_id).status, ProjectStatus::AwaitingProjectDecision);

let settlement_block = inst.get_update_block(project_id, &UpdateType::StartSettlement).unwrap();
inst.jump_to_block(settlement_block);

Expand Down
1 change: 0 additions & 1 deletion pallets/funding/src/tests/5_remainder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,6 @@ mod contribute_extrinsic {

inst.finish_funding(project_id).unwrap();

assert_eq!(inst.get_project_details(project_id).status, ProjectStatus::AwaitingProjectDecision);
let decision_block = inst
.get_update_block(project_id, &UpdateType::ProjectDecision(FundingOutcomeDecision::AcceptFunding))
.unwrap();
Expand Down
1 change: 0 additions & 1 deletion pallets/funding/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,6 @@ pub mod inner_types {
Auction,
CommunityRound(BlockNumber),
FundingFailed,
AwaitingProjectDecision,
FundingSuccessful,
SettlementStarted(FundingOutcome),
SettlementFinished(FundingOutcome),
Expand Down

0 comments on commit a00641a

Please sign in to comment.