mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-06 17:47:01 +02:00
multi: add tor connection healthcheck
This commit adds a new health check, tor connection, to our liveness monitor. A monitor refactor is applied to the server creation such that the scope of health check creation is managed within one function.
This commit is contained in:
15
config.go
15
config.go
@@ -139,6 +139,15 @@ const (
|
||||
defaultTLSBackoff = time.Minute
|
||||
defaultTLSAttempts = 0
|
||||
|
||||
// Set defaults for a health check which ensures that the tor
|
||||
// connection is alive. Although this check is off by default (not all
|
||||
// setups require it), we still set the other default values so that
|
||||
// the health check can be easily enabled with sane defaults.
|
||||
defaultTCInterval = time.Minute
|
||||
defaultTCTimeout = time.Second * 5
|
||||
defaultTCBackoff = time.Minute
|
||||
defaultTCAttempts = 0
|
||||
|
||||
// defaultRemoteMaxHtlcs specifies the default limit for maximum
|
||||
// concurrent HTLCs the remote party may add to commitment transactions.
|
||||
// This value can be overridden with --default-remote-max-htlcs.
|
||||
@@ -541,6 +550,12 @@ func DefaultConfig() Config {
|
||||
Attempts: defaultTLSAttempts,
|
||||
Backoff: defaultTLSBackoff,
|
||||
},
|
||||
TorConnection: &lncfg.CheckConfig{
|
||||
Interval: defaultTCInterval,
|
||||
Timeout: defaultTCTimeout,
|
||||
Attempts: defaultTCAttempts,
|
||||
Backoff: defaultTCBackoff,
|
||||
},
|
||||
},
|
||||
Gossip: &lncfg.Gossip{
|
||||
MaxChannelUpdateBurst: discovery.DefaultMaxChannelUpdateBurst,
|
||||
|
Reference in New Issue
Block a user