multi: add new config ban-threshold
This commit is contained in:
5 files changed
+25
-1
No files matched your search
@@ -403,6 +403,10 @@ type Config struct {
|
||||
// FilterConcurrency is the maximum number of concurrent gossip filter
|
||||
// applications that can be processed.
|
||||
FilterConcurrency int
|
||||
|
||||
// BanThreshold is the score used to decide whether a given peer is
|
||||
// banned or not.
|
||||
BanThreshold uint64
|
||||
}
|
||||
|
||||
// processedNetworkMsg is a wrapper around networkMsg and a boolean. It is
|
||||
@@ -586,7 +590,7 @@ func New(cfg Config, selfKeyDesc *keychain.KeyDescriptor) *AuthenticatedGossiper
|
||||
maxRejectedUpdates,
|
||||
),
|
||||
chanUpdateRateLimiter: make(map[uint64][2]*rate.Limiter),
|
||||
banman: newBanman(DefaultBanThreshold),
|
||||
banman: newBanman(cfg.BanThreshold),
|
||||
}
|
||||
|
||||
gossiper.vb = NewValidationBarrier(1000, gossiper.quit)
|
||||
|
||||
Reference in new issue
Block a user