File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -224,6 +224,10 @@ type Config struct {
224
224
poolRemote bool
225
225
tapRemote bool
226
226
227
+ // statelessInitMode is true if LND and LiT are running in stateless
228
+ // init mode, meaning that no macaroon files are persisted to disk.
229
+ statelessInitMode bool
230
+
227
231
// lndAdminMacaroon is the admin macaroon that is given to us by lnd
228
232
// over an in-memory connection on startup. This is only set in
229
233
// integrated lnd mode.
Original file line number Diff line number Diff line change @@ -679,7 +679,6 @@ func (g *LightningTerminal) start() error {
679
679
680
680
// If we're in integrated and stateless init mode, we won't create
681
681
// macaroon files in any of the subserver daemons.
682
- createDefaultMacaroons := true
683
682
if g .cfg .LndMode == ModeIntegrated && g .lndInterceptorChain != nil &&
684
683
g .lndInterceptorChain .MacaroonService () != nil {
685
684
@@ -689,16 +688,17 @@ func (g *LightningTerminal) start() error {
689
688
// daemons. In all other cases we want default macaroons so we
690
689
// can use the CLI tools to interact with loop/pool/faraday.
691
690
macService := g .lndInterceptorChain .MacaroonService ()
692
- createDefaultMacaroons = ! macService .StatelessInit
691
+ g . cfg . statelessInitMode = macService .StatelessInit
693
692
}
694
693
695
694
// Both connection types are ready now, let's start our sub-servers if
696
695
// they should be started locally as an integrated service.
696
+ createDefaultMacaroons := ! g .cfg .statelessInitMode
697
697
g .subServerMgr .StartIntegratedServers (
698
698
g .basicClient , g .lndClient , createDefaultMacaroons ,
699
699
)
700
700
701
- err = g .startInternalSubServers (createDefaultMacaroons )
701
+ err = g .startInternalSubServers (! g . cfg . statelessInitMode )
702
702
if err != nil {
703
703
return fmt .Errorf ("could not start litd sub-servers: %v" , err )
704
704
}
You can’t perform that action at this time.
0 commit comments