From 52137459e449b2ef0eba1dd2d62eb2ea7eae94fc Mon Sep 17 00:00:00 2001 From: carla Date: Mon, 18 May 2020 14:13:24 +0200 Subject: [PATCH] lncli: add label flag to send many and send coins --- cmd/lncli/commands.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmd/lncli/commands.go b/cmd/lncli/commands.go index e327c9771..56d20a298 100644 --- a/cmd/lncli/commands.go +++ b/cmd/lncli/commands.go @@ -194,6 +194,11 @@ func estimateFees(ctx *cli.Context) error { return nil } +var txLabelFlag = cli.StringFlag{ + Name: "label", + Usage: "(optional) a label for the transaction", +} + var sendCoinsCommand = cli.Command{ Name: "sendcoins", Category: "On-chain", @@ -236,6 +241,7 @@ var sendCoinsCommand = cli.Command{ "sat/byte that should be used when crafting " + "the transaction", }, + txLabelFlag, }, Action: actionDecorator(sendCoins), } @@ -295,6 +301,7 @@ func sendCoins(ctx *cli.Context) error { TargetConf: int32(ctx.Int64("conf_target")), SatPerByte: ctx.Int64("sat_per_byte"), SendAll: ctx.Bool("sweepall"), + Label: ctx.String(txLabelFlag.Name), } txid, err := client.SendCoins(ctxb, req) if err != nil { @@ -450,6 +457,7 @@ var sendManyCommand = cli.Command{ Usage: "(optional) a manual fee expressed in sat/byte that should be " + "used when crafting the transaction", }, + txLabelFlag, }, Action: actionDecorator(sendMany), } @@ -475,6 +483,7 @@ func sendMany(ctx *cli.Context) error { AddrToAmount: amountToAddr, TargetConf: int32(ctx.Int64("conf_target")), SatPerByte: ctx.Int64("sat_per_byte"), + Label: ctx.String(txLabelFlag.Name), }) if err != nil { return err