Skip to content

Commit f12cc12

Browse files
committed
server: register a taproot tower client
1 parent 3cb194c commit f12cc12

File tree

2 files changed

+9
-20
lines changed

2 files changed

+9
-20
lines changed

peer/brontide.go

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,24 +1043,6 @@ func (p *Brontide) addLink(chanPoint *wire.OutPoint,
10431043
return p.cfg.ChainArb.NotifyContractUpdate(*chanPoint, update)
10441044
}
10451045

1046-
var towerClient wtclient.ClientManager
1047-
if lnChan.ChanType().IsTaproot() {
1048-
// Leave the tower client as nil for now until the tower client
1049-
// has support for taproot channels.
1050-
//
1051-
// If the user has activated the tower client, then add a log
1052-
// to explain that any taproot channel updates wil not be
1053-
// backed up to a tower.
1054-
if p.cfg.TowerClient != nil {
1055-
p.log.Debugf("Updates for channel %s will not be "+
1056-
"backed up to a watchtower as watchtowers "+
1057-
"are not yet taproot channel compatible",
1058-
chanPoint)
1059-
}
1060-
} else {
1061-
towerClient = p.cfg.TowerClient
1062-
}
1063-
10641046
//nolint:lll
10651047
linkCfg := htlcswitch.ChannelLinkConfig{
10661048
Peer: p,
@@ -1090,7 +1072,7 @@ func (p *Brontide) addLink(chanPoint *wire.OutPoint,
10901072
MinFeeUpdateTimeout: htlcswitch.DefaultMinLinkFeeUpdateTimeout,
10911073
MaxFeeUpdateTimeout: htlcswitch.DefaultMaxLinkFeeUpdateTimeout,
10921074
OutgoingCltvRejectDelta: p.cfg.OutgoingCltvRejectDelta,
1093-
TowerClient: towerClient,
1075+
TowerClient: p.cfg.TowerClient,
10941076
MaxOutgoingCltvExpiry: p.cfg.MaxOutgoingCltvExpiry,
10951077
MaxFeeAllocation: p.cfg.MaxChannelFeeAllocation,
10961078
MaxAnchorsCommitFeeRate: p.cfg.MaxAnchorsCommitFeeRate,

server.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1553,6 +1553,13 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
15531553
anchorPolicy := policy
15541554
anchorPolicy.BlobType |= blob.Type(blob.FlagAnchorChannel)
15551555

1556+
// Copy the policy for legacy channels and set the blob flag
1557+
// signalling support for taproot channels.
1558+
taprootPolicy := policy
1559+
taprootPolicy.TxPolicy.BlobType |= blob.Type(
1560+
blob.FlagTaprootChannel,
1561+
)
1562+
15561563
s.towerClientMgr, err = wtclient.NewManager(&wtclient.Config{
15571564
FetchClosedChannel: fetchClosedChannel,
15581565
BuildBreachRetribution: buildBreachRetribution,
@@ -1574,7 +1581,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
15741581
MinBackoff: 10 * time.Second,
15751582
MaxBackoff: 5 * time.Minute,
15761583
MaxTasksInMemQueue: cfg.WtClient.MaxTasksInMemQueue,
1577-
}, policy, anchorPolicy)
1584+
}, policy, anchorPolicy, taprootPolicy)
15781585
if err != nil {
15791586
return nil, err
15801587
}

0 commit comments

Comments
 (0)