config: update docs for num-restricted-slots

This commit is contained in:
yyforyongyu committed 2025-06-19 20:29:38 +08:00
1 parent 250a61af6d
commit e47091063a
2 files changed
+8 -6

No files matched your search

+6 -5
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.
+2 -1
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