From 5179d78e0ab602d03f672c3e96160181cf8f7188 Mon Sep 17 00:00:00 2001 From: yanziseeker <153156292+AdventureSeeker987@users.noreply.github.com> Date: Wed, 6 Nov 2024 07:10:30 +0800 Subject: [PATCH] chore: fix some comments (#5661) ## Description ## Notes & open questions ## Change checklist - [x] I have performed a self-review of my own code - [ ] I have made corresponding changes to the documentation - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] A changelog entry has been made in the appropriate crates --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- protocols/gossipsub/src/behaviour.rs | 2 +- protocols/gossipsub/src/peer_score/params.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/protocols/gossipsub/src/behaviour.rs b/protocols/gossipsub/src/behaviour.rs index 6ddb25316e5..bf94a5b7920 100644 --- a/protocols/gossipsub/src/behaviour.rs +++ b/protocols/gossipsub/src/behaviour.rs @@ -947,7 +947,7 @@ where && !self.backoffs.is_backoff_with_slack(topic_hash, p) }); - // Add up to mesh_n of them them to the mesh + // Add up to mesh_n of them to the mesh // NOTE: These aren't randomly added, currently FIFO let add_peers = std::cmp::min(peers.len(), self.config.mesh_n()); tracing::debug!( diff --git a/protocols/gossipsub/src/peer_score/params.rs b/protocols/gossipsub/src/peer_score/params.rs index 35bea0e4353..8c7fdb9bd35 100644 --- a/protocols/gossipsub/src/peer_score/params.rs +++ b/protocols/gossipsub/src/peer_score/params.rs @@ -229,7 +229,7 @@ pub struct TopicScoreParams { /// P1: time in the mesh /// This is the time the peer has been grafted in the mesh. - /// The value of of the parameter is the `time/time_in_mesh_quantum`, capped by `time_in_mesh_cap` + /// The value of the parameter is the `time/time_in_mesh_quantum`, capped by `time_in_mesh_cap` /// The weight of the parameter must be positive (or zero to disable). pub time_in_mesh_weight: f64, pub time_in_mesh_quantum: Duration,