multi: add health check for remote signer

This commit is contained in:
Oliver Gugger
2022-01-05 11:04:30 +01:00
parent 9601a9ab84
commit da59c1fa62
5 changed files with 86 additions and 0 deletions

View File

@@ -148,6 +148,16 @@ const (
defaultTCBackoff = time.Minute
defaultTCAttempts = 0
// Set defaults for a health check which ensures that the remote signer
// RPC connection is alive. Although this check is off by default (only
// active when remote signing is turned on), we still set the other
// default values so that the health check can be easily enabled with
// sane defaults.
defaultRSInterval = time.Minute
defaultRSTimeout = time.Second * 1
defaultRSBackoff = time.Second * 30
defaultRSAttempts = 1
// 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.
@@ -558,6 +568,12 @@ func DefaultConfig() Config {
Attempts: defaultTCAttempts,
Backoff: defaultTCBackoff,
},
RemoteSigner: &lncfg.CheckConfig{
Interval: defaultRSInterval,
Timeout: defaultRSTimeout,
Attempts: defaultRSAttempts,
Backoff: defaultRSBackoff,
},
},
Gossip: &lncfg.Gossip{
MaxChannelUpdateBurst: discovery.DefaultMaxChannelUpdateBurst,