@@ -65,6 +65,7 @@ const (
6565 defaultRemotePoolRpcServer = "localhost:12010"
6666 defaultLndChainSubDir = "chain"
6767 defaultLndChain = "bitcoin"
68+ defaultLndMacaroon = "admin.macaroon"
6869)
6970
7071var (
@@ -104,6 +105,13 @@ var (
104105 defaultLetsEncryptDir = filepath .Join (
105106 defaultLitDir , defaultLetsEncryptSubDir ,
106107 )
108+
109+ // defaultRemoteLndMacaroonPath is the default path we assume for a
110+ // local lnd node to store its admin.macaroon file at.
111+ defaultRemoteLndMacaroonPath = filepath .Join (
112+ lndDefaultConfig .DataDir , defaultLndChainSubDir ,
113+ defaultLndChain , defaultNetwork , defaultLndMacaroon ,
114+ )
107115)
108116
109117// Config is the main configuration struct of lightning-terminal. It contains
@@ -248,7 +256,7 @@ func defaultConfig() *Config {
248256 LitMaxLogFileSize : defaultMaxLogFileSize ,
249257 Lnd : & RemoteDaemonConfig {
250258 RPCServer : defaultRemoteLndRpcServer ,
251- MacaroonPath : lndDefaultConfig . AdminMacPath ,
259+ MacaroonPath : defaultRemoteLndMacaroonPath ,
252260 TLSCertPath : lndDefaultConfig .TLSCertPath ,
253261 },
254262 Faraday : & RemoteDaemonConfig {
@@ -526,7 +534,7 @@ func validateRemoteModeConfig(cfg *Config) error {
526534 // specify --network=testnet for example if everything else is using
527535 // the defaults.
528536 if cfg .Network != defaultNetwork &&
529- r .Lnd .MacaroonPath == defaultLndCfg . AdminMacPath {
537+ r .Lnd .MacaroonPath == defaultRemoteLndMacaroonPath {
530538
531539 r .Lnd .MacaroonPath = filepath .Join (
532540 defaultLndCfg .DataDir , defaultLndChainSubDir ,
0 commit comments