config: update docs for num-restricted-slots

This commit is contained in:
yyforyongyu
2025-06-19 20:29:38 +08:00
committed by Olaoluwa Osuntokun
parent da13c7ab66
commit f7af9701cc
2 changed files with 8 additions and 6 deletions

View File

@@ -238,8 +238,9 @@ const (
// defaultHTTPHeaderTimeout is the default timeout for HTTP requests.
DefaultHTTPHeaderTimeout = 5 * time.Second
// DefaultNumRestrictedSlots is the default number of restricted slots
// we'll allocate in the server.
// DefaultNumRestrictedSlots is the default max number of incoming
// connections allowed in the server. Outbound connections are not
// restricted.
DefaultNumRestrictedSlots = 100
// BitcoinChainName is a string that represents the Bitcoin blockchain.
@@ -529,9 +530,9 @@ type Config struct {
// before timing out reading the headers of an HTTP request.
HTTPHeaderTimeout time.Duration `long:"http-header-timeout" description:"The maximum duration that the server will wait before timing out reading the headers of an HTTP request."`
// NumRestrictedSlots is the number of restricted slots we'll allocate
// in the server.
NumRestrictedSlots uint64 `long:"num-restricted-slots" description:"The number of restricted slots we'll allocate in the server."`
// NumRestrictedSlots is the max number of incoming connections allowed
// in the server. Outbound connections are not restricted.
NumRestrictedSlots uint64 `long:"num-restricted-slots" description:"The max number of incoming connections allowed in the server. Outbound connections are not restricted."`
// NoDisconnectOnPongFailure controls if we'll disconnect if a peer
// doesn't respond to a pong in time.

View File

@@ -566,7 +566,8 @@
; the headers of an HTTP request.
; http-header-timeout=5s
; The number of restricted slots the server will allocate for peers.
; The max number of incoming connections allowed in the server. Outbound
; connections are not restricted.
; num-restricted-slots=100
; If true, a peer will *not* be disconnected if a pong is not received in time