mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-12 05:59:06 +02:00
server: register a taproot tower client
This commit is contained in:
parent
3cb194c45e
commit
f12cc12da5
@ -1043,24 +1043,6 @@ func (p *Brontide) addLink(chanPoint *wire.OutPoint,
|
||||
return p.cfg.ChainArb.NotifyContractUpdate(*chanPoint, update)
|
||||
}
|
||||
|
||||
var towerClient wtclient.ClientManager
|
||||
if lnChan.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)
|
||||
}
|
||||
} else {
|
||||
towerClient = p.cfg.TowerClient
|
||||
}
|
||||
|
||||
//nolint:lll
|
||||
linkCfg := htlcswitch.ChannelLinkConfig{
|
||||
Peer: p,
|
||||
@ -1090,7 +1072,7 @@ func (p *Brontide) addLink(chanPoint *wire.OutPoint,
|
||||
MinFeeUpdateTimeout: htlcswitch.DefaultMinLinkFeeUpdateTimeout,
|
||||
MaxFeeUpdateTimeout: htlcswitch.DefaultMaxLinkFeeUpdateTimeout,
|
||||
OutgoingCltvRejectDelta: p.cfg.OutgoingCltvRejectDelta,
|
||||
TowerClient: towerClient,
|
||||
TowerClient: p.cfg.TowerClient,
|
||||
MaxOutgoingCltvExpiry: p.cfg.MaxOutgoingCltvExpiry,
|
||||
MaxFeeAllocation: p.cfg.MaxChannelFeeAllocation,
|
||||
MaxAnchorsCommitFeeRate: p.cfg.MaxAnchorsCommitFeeRate,
|
||||
|
@ -1553,6 +1553,13 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
||||
anchorPolicy := policy
|
||||
anchorPolicy.BlobType |= blob.Type(blob.FlagAnchorChannel)
|
||||
|
||||
// Copy the policy for legacy channels and set the blob flag
|
||||
// signalling support for taproot channels.
|
||||
taprootPolicy := policy
|
||||
taprootPolicy.TxPolicy.BlobType |= blob.Type(
|
||||
blob.FlagTaprootChannel,
|
||||
)
|
||||
|
||||
s.towerClientMgr, err = wtclient.NewManager(&wtclient.Config{
|
||||
FetchClosedChannel: fetchClosedChannel,
|
||||
BuildBreachRetribution: buildBreachRetribution,
|
||||
@ -1574,7 +1581,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
||||
MinBackoff: 10 * time.Second,
|
||||
MaxBackoff: 5 * time.Minute,
|
||||
MaxTasksInMemQueue: cfg.WtClient.MaxTasksInMemQueue,
|
||||
}, policy, anchorPolicy)
|
||||
}, policy, anchorPolicy, taprootPolicy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user