cmd/lncli: add deletepayments command

To give the CLI user the option to delete a single or multiple payments
in one command, we expose the DeletePayment and DeleteAllPayments
RPCs to the command line as well. Due to the similarity of the two RPCs
we combine them into a single command with multiple flags.

To make the command a bit more safe to run without arguments, we
consciously switch the logic of the RPC flag "failed_payments_only"
which is false by default into a "--include_non_failed" in the CLI which
is false by thefault. So a user running the command without knowing what
they are doing are only deleting failed payments by default, not all of
the payments.
This commit is contained in:
Oliver Gugger committed 2021-09-27 12:34:53 +02:00
1 parent 1d103f1f55
commit 348405994c
2 files changed
+139

No files matched your search

+1
View File
@@ -383,6 +383,7 @@ func main() {
versionCommand,
profileSubCommand,
getStateCommand,
deletePaymentsCommand,
}
// Add any extra commands determined by build flags.