Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Make bandwidth banning more lenient for false positives #510

Merged
merged 1 commit into from
Nov 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions p2p/banner/banner.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ const (
violationsCacheSize = 1000
// violationsBeforeBan is the number of times a peer is allowed to violate the
// bandwidth limits before being banned.
violationsBeforeBan = 4
violationsBeforeBan = 10
// violationsTTL is the TTL for bandwidth violations. If a peer does not have
// any violations during this timespan, their violation count will be reset.
violationsTTL = 6 * time.Hour
violationsTTL = 1 * time.Hour
)

var ErrProtectedIP = errors.New("cannot ban protected IP address")
Expand Down