Skip to content

Commit

Permalink
config+faraday: allow lnd request timeout to be configured
Browse files Browse the repository at this point in the history
  • Loading branch information
guggero committed Dec 7, 2023
1 parent 0534844 commit ea81404
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ type LndConfig struct {

// TLSCertPath is the path to the tls cert that faraday should use.
TLSCertPath string `long:"tlscertpath" description:"Path to TLS cert"`

// RequestTimeout is the maximum time to wait for a response from lnd.
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."`
}

type Config struct { //nolint:maligned
Expand Down
1 change: 1 addition & 0 deletions faraday.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func Main() error {
CustomMacaroonPath: config.Lnd.MacaroonPath,
TLSPath: config.Lnd.TLSCertPath,
CheckVersion: MinLndVersion,
RPCTimeout: config.Lnd.RequestTimeout,
})
if err != nil {
return fmt.Errorf("cannot connect to lightning services: %v",
Expand Down

0 comments on commit ea81404

Please sign in to comment.