From 17d1d5dc9c6ce796a02e24d435ff4258252d928e Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Mon, 13 Nov 2017 17:08:22 -0800 Subject: [PATCH] lncli: add 'private' flag to openchannel command This make lncli openchannel take a --private parameter, set to false by default. --- cmd/lncli/commands.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmd/lncli/commands.go b/cmd/lncli/commands.go index 038d2b72..95b3e7fa 100644 --- a/cmd/lncli/commands.go +++ b/cmd/lncli/commands.go @@ -422,6 +422,14 @@ var openChannelCommand = cli.Command{ "sat/byte that should be used when crafting " + "the transaction", }, + cli.BoolFlag{ + Name: "private", + Usage: "make the channel private, such that it won't " + + "be announced to the greater network, and " + + "nodes other than the two channel endpoints " + + "must be explicitly told about it to be able " + + "to route through it", + }, }, Action: actionDecorator(openChannel), } @@ -493,6 +501,8 @@ func openChannel(ctx *cli.Context) error { } } + req.Private = ctx.Bool("private") + stream, err := client.OpenChannel(ctxb, req) if err != nil { return err