From 4584ea0681dc3b930018745d6ac6b4f1bbb60fb5 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Thu, 13 Jun 2019 16:05:52 -0700 Subject: [PATCH] cmd/lncli: add new include_incomplete flag for listpayments --- cmd/lncli/commands.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cmd/lncli/commands.go b/cmd/lncli/commands.go index d6f05befa..3be355cb5 100644 --- a/cmd/lncli/commands.go +++ b/cmd/lncli/commands.go @@ -2839,14 +2839,22 @@ var listPaymentsCommand = cli.Command{ Name: "listpayments", Category: "Payments", Usage: "List all outgoing payments.", - Action: actionDecorator(listPayments), + Flags: []cli.Flag{ + cli.BoolFlag{ + Name: "include_incomplete", + Usage: "if set to true, payments still in flight (or failed) will be returned as well", + }, + }, + Action: actionDecorator(listPayments), } func listPayments(ctx *cli.Context) error { client, cleanUp := getClient(ctx) defer cleanUp() - req := &lnrpc.ListPaymentsRequest{} + req := &lnrpc.ListPaymentsRequest{ + IncludeIncomplete: ctx.Bool("include_incomplete"), + } payments, err := client.ListPayments(context.Background(), req) if err != nil {