cmd/lncli: add private flag to addinvoice command

This commit is contained in:
Wilmer Paulino 2018-03-28 00:50:03 -04:00
parent 1713394eb3
commit ff2be77c00
No known key found for this signature in database
GPG Key ID: 6DF57B9F9514972F

@ -1713,6 +1713,12 @@ var addInvoiceCommand = cli.Command{
"specified an expiry of 3600 seconds (1 hour) " +
"is implied.",
},
cli.BoolTFlag{
Name: "private",
Usage: "encode routing hints in the invoice with " +
"private channels in order to assist the " +
"payer in reaching you",
},
},
Action: actionDecorator(addInvoice),
}
@ -1771,6 +1777,7 @@ func addInvoice(ctx *cli.Context) error {
DescriptionHash: descHash,
FallbackAddr: ctx.String("fallback_addr"),
Expiry: ctx.Int64("expiry"),
Private: ctx.Bool("private"),
}
resp, err := client.AddInvoice(context.Background(), invoice)