Skip to content

Commit

Permalink
chore(consensus): fix clippy field_reassign_with_default (#1884)
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-starkware authored Nov 7, 2024
1 parent 8760529 commit 0dd72ad
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions crates/sequencing/papyrus_consensus/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ impl SerializeConfig for ConsensusConfig {

impl Default for ConsensusConfig {
fn default() -> Self {
let mut network_config = NetworkConfig::default();
// TODO(Dan/Shahak): consider something nicer, maybe a builder?
network_config.tcp_port = CONSENSUS_TCP_PORT;
network_config.quic_port = CONSENSUS_QUIC_PORT;
let network_config = NetworkConfig {
tcp_port: CONSENSUS_TCP_PORT,
quic_port: CONSENSUS_QUIC_PORT,
..Default::default()
};
Self {
validator_id: ValidatorId::default(),
network_topic: "consensus".to_string(),
Expand Down

0 comments on commit 0dd72ad

Please sign in to comment.