lnd: add DeletePayment to the RPC

The RPC DeletePayment allows deleteing  single payment from its ID. When calling with `FailedHtlcsOnly` set in the request only failed HTLCs of this payment will be deleted.
This commit is contained in:
Bjarne Magnussen committed 2021-09-13 12:50:40 +02:00
1 parent a5641c5351
commit 7f53656753
8 files changed
+878 -496

No files matched your search

+44 -1
View File
@@ -1688,6 +1688,46 @@
]
}
},
"/v1/payment": {
"delete": {
"summary": "DeletePayment deletes an outgoing payment from DB. Note that it will not\nattempt to delete an In-Flight payment, since that would be unsafe.",
"operationId": "Lightning_DeletePayment",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/lnrpcDeletePaymentResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "payment_hash",
"description": "Payment hash to delete.",
"in": "query",
"required": false,
"type": "string",
"format": "byte"
},
{
"name": "failed_htlcs_only",
"description": "Only delete failed HTLCs from the payment, not the payment itself.",
"in": "query",
"required": false,
"type": "boolean"
}
],
"tags": [
"Lightning"
]
}
},
"/v1/payments": {
"get": {
"summary": "lncli: `listpayments`\nListPayments returns a list of all outgoing payments.",
@@ -1743,7 +1783,7 @@
]
},
"delete": {
"summary": "DeleteAllPayments deletes all outgoing payments from DB.",
"summary": "DeleteAllPayments deletes all outgoing payments from DB. Note that it will\nnot attempt to delete In-Flight payments, since that would be unsafe.",
"operationId": "Lightning_DeleteAllPayments",
"responses": {
"200": {
@@ -3688,6 +3728,9 @@
}
}
},
"lnrpcDeletePaymentResponse": {
"type": "object"
},
"lnrpcDisconnectPeerResponse": {
"type": "object"
},