Skip to content
This repository was archived by the owner on Feb 27, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/task-impls/src/consensus/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>> ConsensusTaskState<TYPES, I>
TYPES,
QuorumVote<TYPES>,
QuorumCertificate<TYPES>,
>(&info, vote.clone(), event, &event_stream)
>(&info, event, &event_stream)
.await;
} else {
let result = collector
Expand Down Expand Up @@ -353,7 +353,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>> ConsensusTaskState<TYPES, I>
TYPES,
TimeoutVote<TYPES>,
TimeoutCertificate<TYPES>,
>(&info, vote.clone(), event, &event_stream)
>(&info, event, &event_stream)
.await;
} else {
let result = collector
Expand Down
10 changes: 2 additions & 8 deletions crates/task-impls/src/consensus2/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ pub(crate) async fn handle_quorum_vote_recv<TYPES: NodeType, I: NodeImplementati
id: task_state.id,
};
*collector = create_vote_accumulator::<TYPES, QuorumVote<TYPES>, QuorumCertificate<TYPES>>(
&info,
vote.clone(),
event,
sender,
&info, event, sender,
)
.await;
} else {
Expand Down Expand Up @@ -96,10 +93,7 @@ pub(crate) async fn handle_timeout_vote_recv<TYPES: NodeType, I: NodeImplementat
};
*collector =
create_vote_accumulator::<TYPES, TimeoutVote<TYPES>, TimeoutCertificate<TYPES>>(
&info,
vote.clone(),
event,
sender,
&info, event, sender,
)
.await;
} else {
Expand Down
2 changes: 1 addition & 1 deletion crates/task-impls/src/da.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>> DaTaskState<TYPES, I> {
TYPES,
DaVote<TYPES>,
DaCertificate<TYPES>,
>(&info, vote.clone(), event, &event_stream)
>(&info, event, &event_stream)
.await;
} else {
let result = collector
Expand Down
2 changes: 1 addition & 1 deletion crates/task-impls/src/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>> UpgradeTaskState<TYPES, I> {
TYPES,
UpgradeVote<TYPES>,
UpgradeCertificate<TYPES>,
>(&info, vote.clone(), event, &tx)
>(&info, event, &tx)
.await;
} else {
let result = collector
Expand Down
9 changes: 3 additions & 6 deletions crates/task-impls/src/view_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>> ViewSyncTaskState<TYPES, I>
view: vote_view,
id: self.id,
};
let vote_collector =
create_vote_accumulator(&info, vote.clone(), event, &event_stream).await;
let vote_collector = create_vote_accumulator(&info, event, &event_stream).await;
if let Some(vote_task) = vote_collector {
relay_map.insert(relay, vote_task);
}
Expand Down Expand Up @@ -331,8 +330,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>> ViewSyncTaskState<TYPES, I>
view: vote_view,
id: self.id,
};
let vote_collector =
create_vote_accumulator(&info, vote.clone(), event, &event_stream).await;
let vote_collector = create_vote_accumulator(&info, event, &event_stream).await;
if let Some(vote_task) = vote_collector {
relay_map.insert(relay, vote_task);
}
Expand Down Expand Up @@ -369,8 +367,7 @@ impl<TYPES: NodeType, I: NodeImplementation<TYPES>> ViewSyncTaskState<TYPES, I>
view: vote_view,
id: self.id,
};
let vote_collector =
create_vote_accumulator(&info, vote.clone(), event, &event_stream).await;
let vote_collector = create_vote_accumulator(&info, event, &event_stream).await;
if let Some(vote_task) = vote_collector {
relay_map.insert(relay, vote_task);
}
Expand Down
9 changes: 0 additions & 9 deletions crates/task-impls/src/vote_collection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ pub struct AccumulatorInfo<TYPES: NodeType> {
/// Calls unwrap but should never panic.
pub async fn create_vote_accumulator<TYPES, VOTE, CERT>(
info: &AccumulatorInfo<TYPES>,
vote: VOTE,
event: Arc<HotShotEvent<TYPES>>,
sender: &Sender<Arc<HotShotEvent<TYPES>>>,
) -> Option<VoteCollectionTaskState<TYPES, VOTE, CERT>>
Expand All @@ -158,14 +157,6 @@ where
+ 'static,
VoteCollectionTaskState<TYPES, VOTE, CERT>: HandleVoteEvent<TYPES, VOTE, CERT>,
{
if vote.view_number() != info.view {
error!(
"Vote view does not match! vote view is {} current view is {}",
*vote.view_number(),
*info.view
);
return None;
}
let new_accumulator = VoteAccumulator {
vote_outcomes: HashMap::new(),
signers: HashMap::new(),
Expand Down