mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
lit: add a statelessInit bool in the config
So that it is easy to check elsewhere if we are in this mode.
This commit is contained in:
parent
d3133ff109
commit
2fc07fffee
2 changed files with 7 additions and 3 deletions
|
|
@ -224,6 +224,10 @@ type Config struct {
|
|||
poolRemote bool
|
||||
tapRemote bool
|
||||
|
||||
// statelessInitMode is true if LND and LiT are running in stateless
|
||||
// init mode, meaning that no macaroon files are persisted to disk.
|
||||
statelessInitMode bool
|
||||
|
||||
// lndAdminMacaroon is the admin macaroon that is given to us by lnd
|
||||
// over an in-memory connection on startup. This is only set in
|
||||
// integrated lnd mode.
|
||||
|
|
|
|||
|
|
@ -679,7 +679,6 @@ func (g *LightningTerminal) start() error {
|
|||
|
||||
// If we're in integrated and stateless init mode, we won't create
|
||||
// macaroon files in any of the subserver daemons.
|
||||
createDefaultMacaroons := true
|
||||
if g.cfg.LndMode == ModeIntegrated && g.lndInterceptorChain != nil &&
|
||||
g.lndInterceptorChain.MacaroonService() != nil {
|
||||
|
||||
|
|
@ -689,16 +688,17 @@ func (g *LightningTerminal) start() error {
|
|||
// daemons. In all other cases we want default macaroons so we
|
||||
// can use the CLI tools to interact with loop/pool/faraday.
|
||||
macService := g.lndInterceptorChain.MacaroonService()
|
||||
createDefaultMacaroons = !macService.StatelessInit
|
||||
g.cfg.statelessInitMode = macService.StatelessInit
|
||||
}
|
||||
|
||||
// Both connection types are ready now, let's start our sub-servers if
|
||||
// they should be started locally as an integrated service.
|
||||
createDefaultMacaroons := !g.cfg.statelessInitMode
|
||||
g.subServerMgr.StartIntegratedServers(
|
||||
g.basicClient, g.lndClient, createDefaultMacaroons,
|
||||
)
|
||||
|
||||
err = g.startInternalSubServers(createDefaultMacaroons)
|
||||
err = g.startInternalSubServers(!g.cfg.statelessInitMode)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not start litd sub-servers: %v", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue