From a5d8f69516efdf94d4c22d2e63b4a70ecfda5769 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 7 Jun 2023 17:20:54 -0700 Subject: [PATCH] peer: soft-disable towers with taproot channels In this commit, we modify the starting logic to note attempt to add a tower client for taproot channels. Instead, we'll just log that this isn't available yet. --- peer/brontide.go | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/peer/brontide.go b/peer/brontide.go index a58a44292..6f57ae234 100644 --- a/peer/brontide.go +++ b/peer/brontide.go @@ -973,9 +973,23 @@ func (p *Brontide) addLink(chanPoint *wire.OutPoint, // okay if the clients are disabled altogether and these values are nil, // as the link will check for nilness before using either. var towerClient htlcswitch.TowerClient - if chanType.HasAnchors() { + switch { + case chanType.IsTaproot(): + // Leave the tower client as nil for now until the tower client + // has support for taproot channels. + // + // If the user has activated the tower client, then add a log + // to explain that any taproot channel updates wil not be + // backed up to a tower. + if p.cfg.TowerClient != nil { + p.log.Debugf("Updates for channel %s will not be "+ + "backed up to a watchtower as watchtowers "+ + "are not yet taproot channel compatible", + chanPoint) + } + case chanType.HasAnchors(): towerClient = p.cfg.AnchorTowerClient - } else { + default: towerClient = p.cfg.TowerClient }