Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
Maddiaa0 committed Dec 20, 2024
1 parent cec830f commit 7f1e79d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions yarn-project/p2p/src/services/peer-scoring/peer_scoring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@ export class PeerScoring {
}

public getScoreState(peerId: string): PeerScoreState {
// TODO: permanently store banned peers?
const score = this.getScore(peerId);
if (score <= MIN_SCORE_BEFORE_BAN) {
if (score < MIN_SCORE_BEFORE_BAN) {
return PeerScoreState.Banned;
}
if (score <= MIN_SCORE_BEFORE_DISCONNECT) {
if (score < MIN_SCORE_BEFORE_DISCONNECT) {
return PeerScoreState.Disconnect;
}
return PeerScoreState.Healthy;
Expand Down

0 comments on commit 7f1e79d

Please sign in to comment.