Skip to content

Commit

Permalink
consensus: fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
herr-seppia committed Feb 9, 2024
1 parent ac75ba1 commit 9c6a7e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions consensus/src/ratification/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl MsgHandler for RatificationHandler {
Ok(HandleMsgOutput::Pending)
}

/// Collects the reduction message from former iteration.
/// Collects the ratification message from former iteration.
async fn collect_from_past(
&mut self,
msg: Message,
Expand All @@ -121,7 +121,7 @@ impl MsgHandler for RatificationHandler {
) -> Result<HandleMsgOutput, ConsensusError> {
let p = Self::unwrap_msg(msg)?;

// Collect vote, if msg payload is reduction type
// Collect vote, if msg payload is ratification type
if let Some((sv, quorum_reached)) = self.aggregator.collect_vote(
committee,
p.header(),
Expand Down
10 changes: 5 additions & 5 deletions consensus/src/validation/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl ValidationHandler {

#[async_trait]
impl MsgHandler for ValidationHandler {
/// Verifies if a msg is a valid reduction message.
/// Verifies if a msg is a valid validation message.
fn verify(
&self,
msg: &Message,
Expand All @@ -83,7 +83,7 @@ impl MsgHandler for ValidationHandler {
Ok(())
}

/// Collects the reduction message.
/// Collects the validation message.
async fn collect(
&mut self,
msg: Message,
Expand All @@ -103,7 +103,7 @@ impl MsgHandler for ValidationHandler {
return Ok(HandleMsgOutput::Pending);
}

// Collect vote, if msg payload is reduction type
// Collect vote, if msg payload is validation type
if let Some((sv, quorum_reached)) = self.aggr.collect_vote(
committee,
p.header(),
Expand Down Expand Up @@ -138,7 +138,7 @@ impl MsgHandler for ValidationHandler {
Ok(HandleMsgOutput::Pending)
}

/// Collects the reduction message from former iteration.
/// Collects the validation message from former iteration.
async fn collect_from_past(
&mut self,
msg: Message,
Expand All @@ -147,7 +147,7 @@ impl MsgHandler for ValidationHandler {
) -> Result<HandleMsgOutput, ConsensusError> {
let p = Self::unwrap_msg(msg)?;

// Collect vote, if msg payload is reduction type
// Collect vote, if msg payload is validation type
if let Some((sv, quorum_reached)) = self.aggr.collect_vote(
committee,
p.header(),
Expand Down

0 comments on commit 9c6a7e9

Please sign in to comment.