Skip to content

Commit bb86712

Browse files
committed
config+faraday: allow lnd request timeout to be configured
1 parent 00e6f47 commit bb86712

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

config.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ type LndConfig struct {
106106

107107
// TLSCertPath is the path to the tls cert that faraday should use.
108108
TLSCertPath string `long:"tlscertpath" description:"Path to TLS cert"`
109+
110+
// RequestTimeout is the maximum time to wait for a response from lnd.
111+
RequestTimeout time.Duration `long:"requesttimeout" description:"The maximum time to wait for a response from lnd, if not set the default of 30 seconds will be used."`
109112
}
110113

111114
type Config struct { //nolint:maligned

faraday.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ func Main() error {
7676
CustomMacaroonPath: config.Lnd.MacaroonPath,
7777
TLSPath: config.Lnd.TLSCertPath,
7878
CheckVersion: MinLndVersion,
79+
RPCTimeout: config.Lnd.RequestTimeout,
7980
})
8081
if err != nil {
8182
return fmt.Errorf("cannot connect to lightning services: %v",

0 commit comments

Comments
 (0)