Merge pull request #5971 from yyforyongyu/add-chan-status

rpcserver: expose ChanStatusFlags in pending close
This commit is contained in:
Oliver Gugger 2021-12-08 12:23:07 +01:00 committed by GitHub
commit 71b23a2c54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 1684 additions and 1657 deletions

View file

@ -17,9 +17,16 @@
* [Add json flag to * [Add json flag to
trackpayment](https://github.com/lightningnetwork/lnd/pull/6060) trackpayment](https://github.com/lightningnetwork/lnd/pull/6060)
## RPC Server
* [ChanStatusFlags is now
exposed](https://github.com/lightningnetwork/lnd/pull/5971) inside
WaitingCloseResp from calling `PendingChannels`.
# Contributors (Alphabetical Order) # Contributors (Alphabetical Order)
* Andras Banki-Horvath * Andras Banki-Horvath
* Harsha Goli * Harsha Goli
* Naveen Srinivasan * Naveen Srinivasan
* Oliver Gugger * Oliver Gugger
* Yong Yu

File diff suppressed because it is too large Load diff

View file

@ -2312,6 +2312,9 @@ message PendingChannelsResponse {
// Total number of forwarding packages created in this channel. // Total number of forwarding packages created in this channel.
int64 num_forwarding_packages = 10; int64 num_forwarding_packages = 10;
// A set of flags showing the current state of the channel.
string chan_status_flags = 11;
} }
message PendingOpenChannel { message PendingOpenChannel {

View file

@ -2757,6 +2757,10 @@
"type": "string", "type": "string",
"format": "int64", "format": "int64",
"description": "Total number of forwarding packages created in this channel." "description": "Total number of forwarding packages created in this channel."
},
"chan_status_flags": {
"type": "string",
"description": "A set of flags showing the current state of the channel."
} }
} }
}, },

View file

@ -3453,6 +3453,7 @@ func (r *rpcServer) PendingChannels(ctx context.Context,
Initiator: rpcInitiator(waitingClose.IsInitiator), Initiator: rpcInitiator(waitingClose.IsInitiator),
CommitmentType: rpcCommitmentType(waitingClose.ChanType), CommitmentType: rpcCommitmentType(waitingClose.ChanType),
NumForwardingPackages: int64(len(fwdPkgs)), NumForwardingPackages: int64(len(fwdPkgs)),
ChanStatusFlags: waitingClose.ChanStatus().String(),
} }
waitingCloseResp := &lnrpc.PendingChannelsResponse_WaitingCloseChannel{ waitingCloseResp := &lnrpc.PendingChannelsResponse_WaitingCloseChannel{