Skip to content

Commit 0ce0c7d

Browse files
yyforyongyuguggero
authored andcommitted
lndclient: add ChanStatusFlags in PendingChannels
1 parent 5d56079 commit 0ce0c7d

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The current compatibility matrix reads as follows:
2626

2727
| `lndclient` git tag | `lnd` version in `go.mod` | minimum required `lnd` version |
2828
| ---------------------------- | ------------------------- | ------------------------------ |
29-
| [`v0.14.0-7`](https://github.com/lightninglabs/lndclient/blob/v0.14.0-7) | `v0.14.1-beta` | `v0.14.0-beta` |
29+
| [`v0.14.2-0`](https://github.com/lightninglabs/lndclient/blob/v0.14.2-0) | `lnd @ 4a62b7cf8c69` | `v0.14.0-beta` |
3030
| [`v0.13.0-10`](https://github.com/lightninglabs/lndclient/blob/v0.13.0-10) | `lnd @ d9f0f07142ea` | `v0.13.0-beta` |
3131
| `master` / [`v0.12.0-13`](https://github.com/lightninglabs/lndclient/blob/v0.12.0-13) | `v0.12.0-beta` | `v0.12.0-beta` |
3232

lightning_client.go

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,6 +1768,12 @@ type WaitingCloseChannel struct {
17681768

17691769
// RemotePending is the txid of the remote party's pending commit.
17701770
RemotePending chainhash.Hash
1771+
1772+
// ChanStatusFlags specifies the current channel state, examples:
1773+
// - ChanStatusBorked|ChanStatusCommitBroadcasted|ChanStatusLocalCloseInitiator
1774+
// - ChanStatusCoopBroadcasted|ChanStatusLocalCloseInitiator
1775+
// - ChanStatusCoopBroadcasted|ChanStatusRemoteCloseInitiator
1776+
ChanStatusFlags string
17711777
}
17721778

17731779
// PendingChannels returns a list of lnd's pending channels.
@@ -1836,10 +1842,11 @@ func (s *lightningClient) PendingChannels(ctx context.Context) (*PendingChannels
18361842
}
18371843

18381844
closing := WaitingCloseChannel{
1839-
PendingChannel: *channel,
1840-
LocalTxid: *local,
1841-
RemoteTxid: *remote,
1842-
RemotePending: *remotePending,
1845+
PendingChannel: *channel,
1846+
LocalTxid: *local,
1847+
RemoteTxid: *remote,
1848+
RemotePending: *remotePending,
1849+
ChanStatusFlags: waiting.Channel.ChanStatusFlags,
18431850
}
18441851
pending.WaitingClose[i] = closing
18451852
}

0 commit comments

Comments
 (0)