multi: remove pending channel from Brontide when funding flow failed

This commit adds a new interface method, `RemovePendingChannel`, to be
used when the funding flow is failed after calling `AddPendingChannel`
such that the Brontide has the most up-to-date view of the active
channels.
This commit is contained in:
yyforyongyu committed 2023-08-09 01:29:18 +08:00
1 parent 3ed579d06f
commit 927572583b
7 files changed
+97 -1

No files matched your search

+3
View File
@@ -31,6 +31,9 @@ type Peer interface {
// channel should fail to be added if the cancel chan is closed.
AddPendingChannel(cid lnwire.ChannelID, cancel <-chan struct{}) error
// RemovePendingChannel removes a pending open channel ID to the peer.
RemovePendingChannel(cid lnwire.ChannelID) error
// WipeChannel removes the channel uniquely identified by its channel
// point from all indexes associated with the peer.
WipeChannel(*wire.OutPoint)