mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
loopd: make the LND RPC timeout configurable
This commit is contained in:
parent
3d1d3eb4aa
commit
28c09bec68
2 changed files with 9 additions and 0 deletions
|
|
@ -76,6 +76,10 @@ var (
|
|||
defaultLndMacaroon,
|
||||
)
|
||||
|
||||
// DefaultLndRPCTimeout is the default timeout to use when communicating
|
||||
// with lnd.
|
||||
DefaultLndRPCTimeout = time.Minute
|
||||
|
||||
// DefaultTLSCertPath is the default full path of the autogenerated TLS
|
||||
// certificate.
|
||||
DefaultTLSCertPath = filepath.Join(
|
||||
|
|
@ -118,6 +122,9 @@ type lndConfig struct {
|
|||
MacaroonPath string `long:"macaroonpath" description:"The full path to the single macaroon to use, either the admin.macaroon or a custom baked one. Cannot be specified at the same time as macaroondir. A custom macaroon must contain ALL permissions required for all subservers to work, otherwise permission errors will occur."`
|
||||
|
||||
TLSPath string `long:"tlspath" description:"Path to lnd tls certificate"`
|
||||
|
||||
// RPCTimeout is the timeout to use when communicating with lnd.
|
||||
RPCTimeout time.Duration `long:"rpctimeout" description:"The timeout to use when communicating with lnd"`
|
||||
}
|
||||
|
||||
type loopServerConfig struct {
|
||||
|
|
@ -217,6 +224,7 @@ func DefaultConfig() Config {
|
|||
Lnd: &lndConfig{
|
||||
Host: "localhost:10009",
|
||||
MacaroonPath: DefaultLndMacaroonPath,
|
||||
RPCTimeout: DefaultLndRPCTimeout,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ func NewListenerConfig(config *Config, rpcCfg RPCConfig) *ListenerCfg {
|
|||
BlockUntilChainSynced: true,
|
||||
CallerCtx: callerCtx,
|
||||
BlockUntilUnlocked: true,
|
||||
RPCTimeout: cfg.RPCTimeout,
|
||||
}
|
||||
|
||||
// If a custom lnd connection is specified we use that
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue