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
2020-10-06 17:23:31 +02:00
parent ae71d60715
commit 294cb4a966
3 changed files with 13 additions and 6 deletions

2
lnd.go
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 "+