From 13843669947f844ed4de4cda034be1741eb080ae Mon Sep 17 00:00:00 2001 From: ueno Date: Mon, 26 Sep 2022 20:38:58 +0900 Subject: [PATCH] lnrpc: add comment for AnchorState [skip ci] --- lnrpc/lightning.pb.go | 10 ++++++++-- lnrpc/lightning.proto | 8 ++++++++ lnrpc/lightning.swagger.json | 3 ++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lnrpc/lightning.pb.go b/lnrpc/lightning.pb.go index 9c9a026e3..86017c58d 100644 --- a/lnrpc/lightning.pb.go +++ b/lnrpc/lightning.pb.go @@ -898,12 +898,18 @@ func (PeerEvent_EventType) EnumDescriptor() ([]byte, []int) { return file_lightning_proto_rawDescGZIP(), []int{54, 0} } +// There are three resolution states for the anchor: +// limbo, lost and recovered. Derive the current state +// from the limbo and recovered balances. type PendingChannelsResponse_ForceClosedChannel_AnchorState int32 const ( - PendingChannelsResponse_ForceClosedChannel_LIMBO PendingChannelsResponse_ForceClosedChannel_AnchorState = 0 + // The recovered_balance is zero and limbo_balance is non-zero. + PendingChannelsResponse_ForceClosedChannel_LIMBO PendingChannelsResponse_ForceClosedChannel_AnchorState = 0 + // The recovered_balance is non-zero. PendingChannelsResponse_ForceClosedChannel_RECOVERED PendingChannelsResponse_ForceClosedChannel_AnchorState = 1 - PendingChannelsResponse_ForceClosedChannel_LOST PendingChannelsResponse_ForceClosedChannel_AnchorState = 2 + // A state that is neither LIMBO nor RECOVERED. + PendingChannelsResponse_ForceClosedChannel_LOST PendingChannelsResponse_ForceClosedChannel_AnchorState = 2 ) // Enum value maps for PendingChannelsResponse_ForceClosedChannel_AnchorState. diff --git a/lnrpc/lightning.proto b/lnrpc/lightning.proto index cf2cfb0e7..7563d4ef9 100644 --- a/lnrpc/lightning.proto +++ b/lnrpc/lightning.proto @@ -2564,9 +2564,17 @@ message PendingChannelsResponse { repeated PendingHTLC pending_htlcs = 8; + /* + There are three resolution states for the anchor: + limbo, lost and recovered. Derive the current state + from the limbo and recovered balances. + */ enum AnchorState { + // The recovered_balance is zero and limbo_balance is non-zero. LIMBO = 0; + // The recovered_balance is non-zero. RECOVERED = 1; + // A state that is neither LIMBO nor RECOVERED. LOST = 2; } diff --git a/lnrpc/lightning.swagger.json b/lnrpc/lightning.swagger.json index ab8e29676..52372be8c 100644 --- a/lnrpc/lightning.swagger.json +++ b/lnrpc/lightning.swagger.json @@ -2760,7 +2760,8 @@ "RECOVERED", "LOST" ], - "default": "LIMBO" + "default": "LIMBO", + "description": "There are three resolution states for the anchor:\nlimbo, lost and recovered. Derive the current state\nfrom the limbo and recovered balances.\n\n - LIMBO: The recovered_balance is zero and limbo_balance is non-zero.\n - RECOVERED: The recovered_balance is non-zero.\n - LOST: A state that is neither LIMBO nor RECOVERED." }, "HTLCAttemptHTLCStatus": { "type": "string",