lncli: remove chain option from profile
This commit is contained in:
1 parent
7fa05f92f5
commit
a7e723e570
2 files changed
+1
-13
No files matched your search
+1
-11
@@ -278,16 +278,6 @@ func contextWithMetadata(ctx context.Context,
|
||||
// extractPathArgs parses the TLS certificate and macaroon paths from the
|
||||
// command.
|
||||
func extractPathArgs(ctx *cli.Context) (string, string, error) {
|
||||
// We'll start off by parsing the active chain and network. These are
|
||||
// needed to determine the correct path to the macaroon when not
|
||||
// specified.
|
||||
chain := strings.ToLower(ctx.GlobalString("chain"))
|
||||
switch chain {
|
||||
case "bitcoin", "litecoin":
|
||||
default:
|
||||
return "", "", fmt.Errorf("unknown chain: %v", chain)
|
||||
}
|
||||
|
||||
network := strings.ToLower(ctx.GlobalString("network"))
|
||||
switch network {
|
||||
case "mainnet", "testnet", "regtest", "simnet", "signet":
|
||||
@@ -311,7 +301,7 @@ func extractPathArgs(ctx *cli.Context) (string, string, error) {
|
||||
// lnddir/data/chain/<chain>/<network> in order to fetch the
|
||||
// macaroon that we need.
|
||||
macPath = filepath.Join(
|
||||
lndDir, defaultDataDir, defaultChainSubDir, chain,
|
||||
lndDir, defaultDataDir, defaultChainSubDir, "bitcoin",
|
||||
network, defaultMacaroonFilename,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user