rpcserver+lnrpc+lncli: add AbandonChannel rpc call
Using AbandonChannel, a channel can be abandoned. This means removing all state without any on-chain or off-chain action. A close summary is the only thing that is stored in the db after abandoning. A specific close type Abandoned is added. Abandoned channels can be retrieved via the ClosedChannels RPC.
This commit is contained in:
10 files changed
+816
-448
No files matched your search
+16
-5
@@ -195,6 +195,13 @@
|
||||
"required": false,
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
},
|
||||
{
|
||||
"name": "abandoned",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
@@ -275,13 +282,13 @@
|
||||
},
|
||||
"/v1/channels/{channel_point.funding_txid_str}/{channel_point.output_index}": {
|
||||
"delete": {
|
||||
"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",
|
||||
"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": "(streaming responses)",
|
||||
"description": "",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/lnrpcCloseStatusUpdate"
|
||||
"$ref": "#/definitions/lnrpcAbandonChannelResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -970,7 +977,8 @@
|
||||
"LOCAL_FORCE_CLOSE",
|
||||
"REMOTE_FORCE_CLOSE",
|
||||
"BREACH_CLOSE",
|
||||
"FUNDING_CANCELED"
|
||||
"FUNDING_CANCELED",
|
||||
"ABANDONED"
|
||||
],
|
||||
"default": "COOPERATIVE_CLOSE"
|
||||
},
|
||||
@@ -1092,6 +1100,9 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"lnrpcAbandonChannelResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"lnrpcAddInvoiceResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in new issue
Block a user