diff --git a/cmd/lncli/main.go b/cmd/lncli/main.go index 3f2bdcf39..63a7a4d6c 100644 --- a/cmd/lncli/main.go +++ b/cmd/lncli/main.go @@ -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// in order to fetch the // macaroon that we need. macPath = filepath.Join( - lndDir, defaultDataDir, defaultChainSubDir, chain, + lndDir, defaultDataDir, defaultChainSubDir, "bitcoin", network, defaultMacaroonFilename, ) } diff --git a/cmd/lncli/profile.go b/cmd/lncli/profile.go index e5d4aacb5..0b91bbe68 100644 --- a/cmd/lncli/profile.go +++ b/cmd/lncli/profile.go @@ -27,7 +27,6 @@ type profileEntry struct { Name string `json:"name"` RPCServer string `json:"rpcserver"` LndDir string `json:"lnddir"` - Chain string `json:"chain"` Network string `json:"network"` NoMacaroons bool `json:"no-macaroons,omitempty"` // nolint:tagliatelle TLSCert string `json:"tlscert"` @@ -153,7 +152,6 @@ func profileFromContext(ctx *cli.Context, store, skipMacaroons bool) ( LndDir: lncfg.CleanAndExpandPath( ctx.GlobalString("lnddir"), ), - Chain: ctx.GlobalString("chain"), Network: ctx.GlobalString("network"), NoMacaroons: ctx.GlobalBool("no-macaroons"), TLSCert: string(tlsCert),