Skip to content

Commit

Permalink
add dots to peer_score comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jxs committed Nov 25, 2024
1 parent 0ec96fa commit d8e3957
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions protocols/gossipsub/src/peer_score.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,14 +337,14 @@ impl PeerScore {
}
}

// P7: behavioural pattern penalty
// P7: behavioural pattern penalty.
if peer_stats.behaviour_penalty > self.params.behaviour_penalty_threshold {
let excess = peer_stats.behaviour_penalty - self.params.behaviour_penalty_threshold;
let p7 = excess * excess;
score += p7 * self.params.behaviour_penalty_weight;
}

// Slow peer weighting
// Slow peer weighting.
if peer_stats.slow_peer_penalty > self.params.slow_peer_threshold {
let excess = peer_stats.slow_peer_penalty - self.params.slow_peer_threshold;
score += excess * self.params.slow_peer_weight;
Expand Down

0 comments on commit d8e3957

Please sign in to comment.