macaroons: remember stateless init

To make sure no macaroons are created anywhere if the stateless
initialization was requested, we keep the requested initialization mode
in the memory of the macaroon service.
This commit is contained in:
Oliver Gugger committed 2020-11-07 11:24:33 +01:00
1 parent ae71d60715
commit 294cb4a966
3 files changed
+13 -6

No files matched your search

+1 -1
View File
@@ -408,7 +408,7 @@ func Main(cfg *Config, lisCfg ListenerCfg, shutdownChan <-chan struct{}) error {
if !cfg.NoMacaroons {
// Create the macaroon authentication/authorization service.
macaroonService, err = macaroons.NewService(
cfg.networkDir, "lnd", macaroons.IPLockChecker,
cfg.networkDir, "lnd", false, macaroons.IPLockChecker,
)
if err != nil {
err := fmt.Errorf("unable to set up macaroon "+