Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoffranca committed Oct 30, 2024
1 parent ecb11c1 commit 68527cb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
12 changes: 6 additions & 6 deletions node/actors/bft/src/chonky_bft/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ use zksync_concurrency::{
use zksync_consensus_network::io::ConsensusReq;
use zksync_consensus_roles::validator::{self, ConsensusMsg};

pub(crate) mod commit;
mod commit;
mod misc;
pub(crate) mod new_view;
pub(crate) mod proposal;
mod new_view;
mod proposal;
/// The proposer module contains the logic for the proposer role in ChonkyBFT.
pub(crate) mod proposer;
pub(crate) mod timeout;

#[cfg(test)]
pub(crate) mod testonly;
#[cfg(test)]
mod tests;
mod timeout;

/// The StateMachine struct contains the state of the replica and implements all the
/// logic of ChonkyBFT.
Expand Down Expand Up @@ -282,7 +282,7 @@ impl StateMachine {
) -> SelectionFunctionResult {
if old_req.msg.key != new_req.msg.key || old_req.msg.msg.label() != new_req.msg.msg.label()
{
return SelectionFunctionResult::Keep;
SelectionFunctionResult::Keep
} else {
// Discard older message
if old_req.msg.msg.view().number < new_req.msg.msg.view().number {
Expand Down
4 changes: 2 additions & 2 deletions node/actors/bft/src/chonky_bft/proposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ impl StateMachine {
if let Err(err) = self
.config
.payload_manager
.verify(ctx, implied_block_number, &payload)
.verify(ctx, implied_block_number, payload)
.await
{
return Err(match err {
Expand All @@ -190,7 +190,7 @@ impl StateMachine {

// Create our commit vote.
let commit_vote = validator::ReplicaCommit {
view: message.view().clone(),
view: message.view(),
proposal: BlockHeader {
number: implied_block_number,
payload: block_hash,
Expand Down
6 changes: 4 additions & 2 deletions node/actors/bft/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! This crate implements the ChonkyBFT algorithm. You can find the specification of the algorithm [here](../../../../spec).
//! This crate contains the consensus actor, which is responsible for handling the logic that allows us to reach aggrement on blocks.

Check warning on line 1 in node/actors/bft/src/lib.rs

View workflow job for this annotation

GitHub Actions / typos

"aggrement" should be "agreement".
//! It uses a new cosnensus algorithm developed at Matter Labs, called ChonkyBFT. You can find the specification of the algorithm [here](../../../../spec).

use crate::io::{InputMessage, OutputMessage};
use anyhow::Context;
Expand All @@ -9,7 +10,8 @@ use zksync_concurrency::{ctx, error::Wrap as _, scope, sync};
use zksync_consensus_roles::validator;
use zksync_consensus_utils::pipe::ActorPipe;

pub(crate) mod chonky_bft;
/// This module contains the implementation of the ChonkyBFT algorithm.
mod chonky_bft;
mod config;
pub mod io;
mod metrics;
Expand Down

0 comments on commit 68527cb

Please sign in to comment.