Skip to content

Commit d53e5ea

Browse files
committed
config+terminal: allow configuring of lnd RPC timeout
1 parent 31a6ad5 commit d53e5ea

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ type Config struct {
193193
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"`
194194
Lnd *lnd.Config `group:"Integrated lnd (use when lnd-mode=integrated)" namespace:"lnd"`
195195
LndConnectInterval time.Duration `long:"lndconnectinterval" hidden:"true" description:"The interval at which LiT tries to connect to the lnd node. This value should only be changed for development mode."`
196+
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."`
196197

197198
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"`
198199
Faraday *faraday.Config `group:"Integrated faraday options (use when faraday-mode=integrated)" namespace:"faraday"`
@@ -314,6 +315,7 @@ func defaultConfig() *Config {
314315
LndMode: DefaultLndMode,
315316
Lnd: &lndDefaultConfig,
316317
LndConnectInterval: defaultStartupTimeout,
318+
LndRPCTimeout: defaultRPCTimeout,
317319
LitDir: DefaultLitDir,
318320
LetsEncryptListen: defaultLetsEncryptListen,
319321
LetsEncryptDir: defaultLetsEncryptDir,

terminal.go

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

8383
defaultServerTimeout = 10 * time.Second
8484
defaultConnectTimeout = 15 * time.Second
85+
defaultRPCTimeout = 1 * time.Minute
8586
defaultStartupTimeout = 5 * time.Second
8687
)
8788

@@ -904,6 +905,7 @@ func (g *LightningTerminal) setUpLNDClients(lndQuit chan struct{}) error {
904905
CallerCtx: ctxc,
905906
CheckVersion: minimalCompatibleVersion,
906907
ChainSyncPollInterval: g.cfg.LndConnectInterval,
908+
RPCTimeout: g.cfg.LndRPCTimeout,
907909
},
908910
)
909911
if err == nil {

0 commit comments

Comments
 (0)