Merge pull request #7702 from ellemouton/towerClientMux

wtclient: Tower Client Multiplexer
This commit is contained in:
Elle
2023-12-05 12:27:05 +02:00
committed by GitHub
14 changed files with 1265 additions and 1015 deletions

View File

@@ -250,7 +250,7 @@ type TowerClient interface {
// parameters within the client. This should be called during link
// startup to ensure that the client is able to support the link during
// operation.
RegisterChannel(lnwire.ChannelID) error
RegisterChannel(lnwire.ChannelID, channeldb.ChannelType) error
// BackupState initiates a request to back up a particular revoked
// state. If the method returns nil, the backup is guaranteed to be

View File

@@ -416,7 +416,9 @@ func (l *channelLink) Start() error {
// If the config supplied watchtower client, ensure the channel is
// registered before trying to use it during operation.
if l.cfg.TowerClient != nil {
err := l.cfg.TowerClient.RegisterChannel(l.ChanID())
err := l.cfg.TowerClient.RegisterChannel(
l.ChanID(), l.channel.State().ChanType,
)
if err != nil {
return err
}