Skip to content

Comments

cmd/lncli: add new delpayments command line option#5778

Closed
Roasbeef wants to merge 2 commits intolightningnetwork:masterfrom
Roasbeef:del-failed-payments-cmd
Closed

cmd/lncli: add new delpayments command line option#5778
Roasbeef wants to merge 2 commits intolightningnetwork:masterfrom
Roasbeef:del-failed-payments-cmd

Conversation

@Roasbeef
Copy link
Member

In this commit, we add a new CLI command to lncli: delpayments. This
command exposes the DeleteAllPayments command over command line, with
a set of arguments that should make it difficult to use improperly. We
require that the user explicitly specify if they want to delta all
payments, just failed payments, or failed HTLC payments.

In this commit, we add a new CLI command to `lncli`: `delpayments`. This
command exposes the `DeleteAllPayments` command over command line, with
a set of arguments that should make it difficult to use improperly. We
require that the user _explicitly_ specify if they want to delta all
payments, just failed payments, or failed HTLC payments.
@Roasbeef Roasbeef requested a review from arshbot September 22, 2021 21:57
@Roasbeef Roasbeef force-pushed the del-failed-payments-cmd branch from 860e508 to 8c85142 Compare September 22, 2021 21:57
@guggero
Copy link
Collaborator

guggero commented Sep 23, 2021

Duplicate of #5699?

var deletePaymentsCommand = cli.Command{
Name: "delpayments",
Category: "payments",
Usage: "Delete all payments, only failed payments, or only the HTLCs associated with faild payments",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Usage: "Delete all payments, only failed payments, or only the HTLCs associated with faild payments",
Usage: "Delete all payments, only failed payments, or only the HTLCs associated with failed payments",

Typo: missing e


// Show command help if no arguments provided
if ctx.NArg() == 0 && ctx.NumFlags() == 0 {
cli.ShowCommandHelp(ctx, "delpayments")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW golinter errcheck flags this line

cmd/lncli/commands.go:2864:22: Error return value of `cli.ShowCommandHelp` is not checked (errcheck)
		cli.ShowCommandHelp(ctx, "delpayments")
		                   ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants