config: remove default macaroon path
Co-Authored-By: Karl Ranna <karl@karlranna.com>
This commit is contained in:
parent
9981fd8fa7
commit
e1726ecb2f
16
config.go
16
config.go
@ -76,10 +76,6 @@ var (
|
||||
defaultTLSCertPath = filepath.Join(defaultLndDir, defaultTLSCertFilename)
|
||||
defaultTLSKeyPath = filepath.Join(defaultLndDir, defaultTLSKeyFilename)
|
||||
|
||||
defaultAdminMacPath = filepath.Join(defaultLndDir, defaultAdminMacFilename)
|
||||
defaultReadMacPath = filepath.Join(defaultLndDir, defaultReadMacFilename)
|
||||
defaultInvoiceMacPath = filepath.Join(defaultLndDir, defaultInvoiceMacFilename)
|
||||
|
||||
defaultBtcdDir = btcutil.AppDataDir("btcd", false)
|
||||
defaultBtcdRPCCertFile = filepath.Join(defaultBtcdDir, "rpc.cert")
|
||||
|
||||
@ -256,9 +252,6 @@ func loadConfig() (*config, error) {
|
||||
DebugLevel: defaultLogLevel,
|
||||
TLSCertPath: defaultTLSCertPath,
|
||||
TLSKeyPath: defaultTLSKeyPath,
|
||||
AdminMacPath: defaultAdminMacPath,
|
||||
InvoiceMacPath: defaultInvoiceMacPath,
|
||||
ReadMacPath: defaultReadMacPath,
|
||||
LogDir: defaultLogDir,
|
||||
MaxLogFiles: defaultMaxLogFiles,
|
||||
MaxLogFileSize: defaultMaxLogFileSize,
|
||||
@ -347,9 +340,6 @@ func loadConfig() (*config, error) {
|
||||
preCfg.DataDir = filepath.Join(lndDir, defaultDataDirname)
|
||||
preCfg.TLSCertPath = filepath.Join(lndDir, defaultTLSCertFilename)
|
||||
preCfg.TLSKeyPath = filepath.Join(lndDir, defaultTLSKeyFilename)
|
||||
preCfg.AdminMacPath = filepath.Join(lndDir, defaultAdminMacFilename)
|
||||
preCfg.InvoiceMacPath = filepath.Join(lndDir, defaultInvoiceMacFilename)
|
||||
preCfg.ReadMacPath = filepath.Join(lndDir, defaultReadMacFilename)
|
||||
preCfg.LogDir = filepath.Join(lndDir, defaultLogDirname)
|
||||
preCfg.Tor.V2PrivateKeyPath = filepath.Join(lndDir, defaultTorV2PrivateKeyFilename)
|
||||
}
|
||||
@ -777,17 +767,17 @@ func loadConfig() (*config, error) {
|
||||
// If a custom macaroon directory wasn't specified and the data
|
||||
// directory has changed from the default path, then we'll also update
|
||||
// the path for the macaroons to be generated.
|
||||
if cfg.DataDir != defaultDataDir && cfg.AdminMacPath == defaultAdminMacPath {
|
||||
if cfg.AdminMacPath == "" {
|
||||
cfg.AdminMacPath = filepath.Join(
|
||||
networkDir, defaultAdminMacFilename,
|
||||
)
|
||||
}
|
||||
if cfg.DataDir != defaultDataDir && cfg.ReadMacPath == defaultReadMacPath {
|
||||
if cfg.ReadMacPath == "" {
|
||||
cfg.ReadMacPath = filepath.Join(
|
||||
networkDir, defaultReadMacFilename,
|
||||
)
|
||||
}
|
||||
if cfg.DataDir != defaultDataDir && cfg.InvoiceMacPath == defaultInvoiceMacPath {
|
||||
if cfg.InvoiceMacPath == "" {
|
||||
cfg.InvoiceMacPath = filepath.Join(
|
||||
networkDir, defaultInvoiceMacFilename,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user