lncli: add 'private' flag to openchannel command

This make lncli openchannel take a --private
parameter, set to false by default.
This commit is contained in:
Johan T. Halseth 2017-11-13 17:08:22 -08:00 committed by Olaoluwa Osuntokun
parent 464f57d3a5
commit 17d1d5dc9c
1 changed files with 10 additions and 0 deletions

View File

@ -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