lnd+macaroons: specify location when creating macaroon service

To allow the macaroon service to be used in other projects, we want the
location to be passed in as a parameter instead of being hard coded.
This commit is contained in:
Oliver Gugger
2020-07-13 16:33:39 +02:00
parent 8668248d96
commit d4c4cf01f0
3 changed files with 15 additions and 7 deletions

2
lnd.go
View File

@@ -393,7 +393,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, macaroons.IPLockChecker,
cfg.networkDir, "lnd", macaroons.IPLockChecker,
)
if err != nil {
err := fmt.Errorf("unable to set up macaroon "+