Skip to content

Commit

Permalink
Rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
shenkeyao committed Jan 9, 2025
1 parent 8867625 commit 7cab466
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions crates/task-impls/src/quorum_vote/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ async fn verify_drb_result<TYPES: NodeType, I: NodeImplementation<TYPES>, V: Ver

/// Start the DRB computation task for the next epoch.
///
/// Uses the seed previously stored in `store_drb_seed_and_computed_result`.
/// Uses the seed previously stored in `store_drb_seed_and_result`.
async fn start_drb_task<TYPES: NodeType, I: NodeImplementation<TYPES>, V: Versions>(
proposal: &QuorumProposal2<TYPES>,
task_state: &mut QuorumVoteTaskState<TYPES, I, V>,
Expand Down Expand Up @@ -229,11 +229,7 @@ async fn start_drb_task<TYPES: NodeType, I: NodeImplementation<TYPES>, V: Versio
///
/// We don't need to handle the special cases explicitly here, because the first leaf with which
/// we'll start the DRB computation is for epoch 3.
async fn store_drb_seed_and_computed_result<
TYPES: NodeType,
I: NodeImplementation<TYPES>,
V: Versions,
>(
async fn store_drb_seed_and_result<TYPES: NodeType, I: NodeImplementation<TYPES>, V: Versions>(
task_state: &mut QuorumVoteTaskState<TYPES, I, V>,
decided_leaf: &Leaf2<TYPES>,
) -> Result<()> {
Expand Down Expand Up @@ -437,8 +433,7 @@ pub(crate) async fn handle_quorum_proposal_validated<
if version >= V::Epochs::VERSION {
// `leaf_views.last()` is never none if we've reached a new decide, so this is safe to
// unwrap.
store_drb_seed_and_computed_result(task_state, &leaf_views.last().unwrap().leaf)
.await?;
store_drb_seed_and_result(task_state, &leaf_views.last().unwrap().leaf).await?;
}
}

Expand Down

0 comments on commit 7cab466

Please sign in to comment.