lnrpc: modify AbandonChannel REST endpoint

In this commit, we modify the AbandonChannel REST endpoint to avoid
conflicting with the CloseChannel's. Otherwise, if a debug build of lnd
is being used, there's no way of closing channels through the REST API
as it's been overwritten by AbandonChannel.
This commit is contained in:
Wilmer Paulino committed 2018-11-08 16:16:31 -08:00
1 parent 3ff6055a62
commit 3a314ba4a7
4 files changed
+443 -410

No files matched your search

+36 -4
View File
@@ -148,6 +148,38 @@
]
}
},
"/v1/channels/abandon/{channel_point.funding_txid_str}/{channel_point.output_index}": {
"delete": {
"summary": "* lncli: `abandonchannel`\nAbandonChannel removes all channel state from the database except for a\nclose summary. This method can be used to get rid of permanently unusable\nchannels due to bugs fixed in newer versions of lnd. Only available\nwhen in debug builds of lnd.",
"operationId": "AbandonChannel",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/lnrpcAbandonChannelResponse"
}
}
},
"parameters": [
{
"name": "channel_point.funding_txid_str",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "channel_point.output_index",
"in": "path",
"required": true,
"type": "integer",
"format": "int64"
}
],
"tags": [
"Lightning"
]
}
},
"/v1/channels/closed": {
"get": {
"summary": "* lncli: `closedchannels`\nClosedChannels returns a description of all the closed channels that \nthis node was a participant in.",
@@ -282,13 +314,13 @@
},
"/v1/channels/{channel_point.funding_txid_str}/{channel_point.output_index}": {
"delete": {
"summary": "* lncli: `abandonchannel`\nAbandonChannel removes all channel state from the database except for a\nclose summary. This method can be used to get rid of permanently unusable\nchannels due to bugs fixed in newer versions of lnd. Only available\nwhen in debug builds of lnd.",
"operationId": "AbandonChannel",
"summary": "* lncli: `closechannel`\nCloseChannel attempts to close an active channel identified by its channel\noutpoint (ChannelPoint). The actions of this method can additionally be\naugmented to attempt a force close after a timeout period in the case of an\ninactive peer. If a non-force close (cooperative closure) is requested,\nthen the user can specify either a target number of blocks until the\nclosure transaction is confirmed, or a manual fee rate. If neither are\nspecified, then a default lax, block confirmation target is used.",
"operationId": "CloseChannel",
"responses": {
"200": {
"description": "",
"description": "(streaming responses)",
"schema": {
"$ref": "#/definitions/lnrpcAbandonChannelResponse"
"$ref": "#/definitions/lnrpcCloseStatusUpdate"
}
}
},