lntest: fix macaroon paths
This change makes sure that all macaroons are stored in the same folder. This makes it possible to use the lntest package in external projects that use loop's lndclient library which currently assumes that the admin macaroon and subserver macaroons are in the same sub folder of lnd's data directory.
This commit is contained in:
1 file changed
+7
-3
+7
-3
@@ -298,9 +298,13 @@ func newNode(cfg NodeConfig) (*HarnessNode, error) {
|
||||
cfg.LogDir = filepath.Join(cfg.BaseDir, "log")
|
||||
cfg.TLSCertPath = filepath.Join(cfg.DataDir, "tls.cert")
|
||||
cfg.TLSKeyPath = filepath.Join(cfg.DataDir, "tls.key")
|
||||
cfg.AdminMacPath = filepath.Join(cfg.DataDir, "admin.macaroon")
|
||||
cfg.ReadMacPath = filepath.Join(cfg.DataDir, "readonly.macaroon")
|
||||
cfg.InvoiceMacPath = filepath.Join(cfg.DataDir, "invoice.macaroon")
|
||||
|
||||
networkDir := filepath.Join(
|
||||
cfg.DataDir, "chain", "bitcoin", cfg.NetParams.Name,
|
||||
)
|
||||
cfg.AdminMacPath = filepath.Join(networkDir, "admin.macaroon")
|
||||
cfg.ReadMacPath = filepath.Join(networkDir, "readonly.macaroon")
|
||||
cfg.InvoiceMacPath = filepath.Join(networkDir, "invoice.macaroon")
|
||||
|
||||
cfg.P2PPort, cfg.RPCPort, cfg.RESTPort, cfg.ProfilePort = generateListeningPorts()
|
||||
|
||||
|
||||
Reference in new issue
Block a user