Skip to content

Commit 654a652

Browse files
committed
config+terminal: allow configuring of lnd RPC timeout
1 parent cb6977f commit 654a652

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

config.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ type Config struct {
189189
// friendly. Because then we can reference the explicit modes in the
190190
// help descriptions of the section headers. We'll parse the mode into
191191
// a bool for internal use for better code readability.
192-
LndMode string `long:"lnd-mode" description:"The mode to run lnd in, either 'remote' (default) or 'integrated'. 'integrated' means lnd is started alongside the UI and everything is stored in lnd's main data directory, configure everything by using the --lnd.* flags. 'remote' means the UI connects to an existing lnd node and acts as a proxy for gRPC calls to it. In the remote node LiT creates its own directory for log and configuration files, configure everything using the --remote.* flags." choice:"integrated" choice:"remote"`
193-
Lnd *lnd.Config `group:"Integrated lnd (use when lnd-mode=integrated)" namespace:"lnd"`
192+
LndMode string `long:"lnd-mode" description:"The mode to run lnd in, either 'remote' (default) or 'integrated'. 'integrated' means lnd is started alongside the UI and everything is stored in lnd's main data directory, configure everything by using the --lnd.* flags. 'remote' means the UI connects to an existing lnd node and acts as a proxy for gRPC calls to it. In the remote node LiT creates its own directory for log and configuration files, configure everything using the --remote.* flags." choice:"integrated" choice:"remote"`
193+
Lnd *lnd.Config `group:"Integrated lnd (use when lnd-mode=integrated)" namespace:"lnd"`
194+
LndRPCTimeout time.Duration `long:"lndrpctimeout" description:"The timeout for RPC calls to lnd from other sub servers. This can be adjusted for slow lnd instances to give loop/pool/faraday/taproot-assets more time when querying into lnd's RPC methods."`
194195

195196
FaradayMode string `long:"faraday-mode" description:"The mode to run faraday in, either 'integrated' (default), 'remote' or 'disable'. 'integrated' means faraday is started alongside the UI and everything is stored in faraday's main data directory, configure everything by using the --faraday.* flags. 'remote' means the UI connects to an existing faraday node and acts as a proxy for gRPC calls to it. 'disable' means that LiT is started without faraday." choice:"integrated" choice:"remote" choice:"disable"`
196197
Faraday *faraday.Config `group:"Integrated faraday options (use when faraday-mode=integrated)" namespace:"faraday"`
@@ -311,6 +312,7 @@ func defaultConfig() *Config {
311312
Network: DefaultNetwork,
312313
LndMode: DefaultLndMode,
313314
Lnd: &lndDefaultConfig,
315+
LndRPCTimeout: defaultRPCTimeout,
314316
LitDir: DefaultLitDir,
315317
LetsEncryptListen: defaultLetsEncryptListen,
316318
LetsEncryptDir: defaultLetsEncryptDir,

terminal.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ const (
7474

7575
defaultServerTimeout = 10 * time.Second
7676
defaultConnectTimeout = 15 * time.Second
77+
defaultRPCTimeout = 1 * time.Minute
7778
defaultStartupTimeout = 5 * time.Second
7879
)
7980

@@ -873,6 +874,7 @@ func (g *LightningTerminal) setUpLNDClients(lndQuit chan struct{}) error {
873874
BlockUntilUnlocked: true,
874875
CallerCtx: ctxc,
875876
CheckVersion: minimalCompatibleVersion,
877+
RPCTimeout: g.cfg.LndRPCTimeout,
876878
},
877879
)
878880
if err == nil {

0 commit comments

Comments
 (0)