Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bfish713 committed Sep 15, 2023
1 parent 8c5842e commit 7264f17
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/hotshot/src/tasks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ where
Commitment = TYPES::BlockType,
>,
{
// build the da task
// build the transactions task
let c_api: HotShotSequencingConsensusApi<TYPES, I> = HotShotSequencingConsensusApi {
inner: handle.hotshot.inner.clone(),
};
Expand Down
4 changes: 2 additions & 2 deletions crates/task-impls/src/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use tracing::{debug, error, instrument, warn};
/// Error type for consensus tasks
pub struct ConsensusTaskError {}

/// Tracks state of a DA task
/// Tracks state of a Transaction task
pub struct TransactionTaskState<
TYPES: NodeType,
I: NodeImplementation<
Expand Down Expand Up @@ -310,7 +310,7 @@ where
matches!(
event,
SequencingHotShotEvent::TransactionsRecv(_)
| SequencingHotShotEvent::DAVoteRecv(_)
| SequencingHotShotEvent::LeafDecided(_)
| SequencingHotShotEvent::Shutdown
| SequencingHotShotEvent::ViewChange(_)
)
Expand Down
5 changes: 3 additions & 2 deletions crates/testing/tests/network_task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,14 @@ async fn test_network_task() {
SequencingHotShotEvent::VidDisperseSend(da_vid_disperse, pub_key),
2, // 2 occurrences: 1 from `input`, 1 from the DA task
);
output.insert(SequencingHotShotEvent::Timeout(ViewNumber::new(1)), 1);
output.insert(SequencingHotShotEvent::Timeout(ViewNumber::new(2)), 1);

// Only one output from the input.
// The consensus task will fail to send a second proposal, like the DA task does, due to the
// view number check in `publish_proposal_if_able` in consensus.rs, and we will see an error in
// logging, but that is fine for testing as long as the network task is correctly handling
// events.
output.insert(SequencingHotShotEvent::Timeout(ViewNumber::new(1)), 1);
output.insert(SequencingHotShotEvent::Timeout(ViewNumber::new(2)), 1);
output.insert(
SequencingHotShotEvent::QuorumProposalSend(quorum_proposal.clone(), pub_key),
1,
Expand Down

0 comments on commit 7264f17

Please sign in to comment.