From 385be8edba30a4ab65c94f26005078ceaef749da Mon Sep 17 00:00:00 2001 From: Jarred Parr Date: Thu, 28 Mar 2024 10:21:34 -0400 Subject: [PATCH] combine tasks, remove dead test --- crates/task-impls/src/quorum_proposal.rs | 13 +++--- crates/testing/tests/quorum_proposal_task.rs | 45 ++------------------ 2 files changed, 11 insertions(+), 47 deletions(-) diff --git a/crates/task-impls/src/quorum_proposal.rs b/crates/task-impls/src/quorum_proposal.rs index b4b360f194..9045c0852a 100644 --- a/crates/task-impls/src/quorum_proposal.rs +++ b/crates/task-impls/src/quorum_proposal.rs @@ -197,7 +197,6 @@ impl> QuorumProposalTaskState { if let HotShotEvent::QCFormed(either::Left(qc)) = event { @@ -243,7 +242,11 @@ impl> QuorumProposalTaskState> QuorumProposalTaskState> QuorumProposalTaskState { - proposal_cert_validated_dependency.mark_as_completed(event); + proposal_cert_dependency.mark_as_completed(event); } HotShotEvent::QCFormed(quorum_certificate) => match quorum_certificate { Either::Right(_) => { @@ -324,7 +327,7 @@ impl> QuorumProposalTaskState::create_from(&handle).await; - inject_quorum_proposal_polls(&quorum_proposal_task_state).await; - - let script = vec![view_2]; - run_test_script(script, quorum_proposal_task_state).await; -} - -#[cfg(test)] -#[cfg_attr(async_executor_impl = "tokio", tokio::test(flavor = "multi_thread"))] -#[cfg_attr(async_executor_impl = "async-std", async_std::test)] -async fn test_quorum_proposal_task_qc_proposal() { - async_compatibility_layer::logging::setup_logging(); - async_compatibility_layer::logging::setup_backtrace(); - - let handle = build_system_handle(2).await.0; - let quorum_membership = handle.hotshot.memberships.quorum_membership.clone(); - let payload_commitment = make_payload_commitment(&quorum_membership, ViewNumber::new(2)); - - let mut generator = TestViewGenerator::generate(quorum_membership.clone()); - - let mut proposals = Vec::new(); - let mut leaders = Vec::new(); - for view in (&mut generator).take(2) { - proposals.push(view.quorum_proposal.clone()); - leaders.push(view.leader_public_key); - } - let cert = proposals[1].data.justify_qc.clone(); - // Run at view 2, the quorum vote task shouldn't care as long as the bookkeeping is correct - let view_2 = TestScriptStage { - inputs: vec![ QCFormed(either::Left(cert.clone())), SendPayloadCommitmentAndMetadata(payload_commitment, (), ViewNumber::new(2)), ], outputs: vec![ + exact(QuorumProposalValidated(proposals[1].data.clone())), exact(QuorumProposalDependenciesValidated(ViewNumber::new(2))), exact(DummyQuorumProposalSend(ViewNumber::new(2))), ],