server: register a taproot tower client
This commit is contained in:
2 files changed
+9
-20
No files matched your search
+1
-19
@@ -1043,24 +1043,6 @@ func (p *Brontide) addLink(chanPoint *wire.OutPoint,
|
|||||||
return p.cfg.ChainArb.NotifyContractUpdate(*chanPoint, update)
|
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
|
//nolint:lll
|
||||||
linkCfg := htlcswitch.ChannelLinkConfig{
|
linkCfg := htlcswitch.ChannelLinkConfig{
|
||||||
Peer: p,
|
Peer: p,
|
||||||
@@ -1090,7 +1072,7 @@ func (p *Brontide) addLink(chanPoint *wire.OutPoint,
|
|||||||
MinFeeUpdateTimeout: htlcswitch.DefaultMinLinkFeeUpdateTimeout,
|
MinFeeUpdateTimeout: htlcswitch.DefaultMinLinkFeeUpdateTimeout,
|
||||||
MaxFeeUpdateTimeout: htlcswitch.DefaultMaxLinkFeeUpdateTimeout,
|
MaxFeeUpdateTimeout: htlcswitch.DefaultMaxLinkFeeUpdateTimeout,
|
||||||
OutgoingCltvRejectDelta: p.cfg.OutgoingCltvRejectDelta,
|
OutgoingCltvRejectDelta: p.cfg.OutgoingCltvRejectDelta,
|
||||||
TowerClient: towerClient,
|
TowerClient: p.cfg.TowerClient,
|
||||||
MaxOutgoingCltvExpiry: p.cfg.MaxOutgoingCltvExpiry,
|
MaxOutgoingCltvExpiry: p.cfg.MaxOutgoingCltvExpiry,
|
||||||
MaxFeeAllocation: p.cfg.MaxChannelFeeAllocation,
|
MaxFeeAllocation: p.cfg.MaxChannelFeeAllocation,
|
||||||
MaxAnchorsCommitFeeRate: p.cfg.MaxAnchorsCommitFeeRate,
|
MaxAnchorsCommitFeeRate: p.cfg.MaxAnchorsCommitFeeRate,
|
||||||
|
|||||||
@@ -1553,6 +1553,13 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
|||||||
anchorPolicy := policy
|
anchorPolicy := policy
|
||||||
anchorPolicy.BlobType |= blob.Type(blob.FlagAnchorChannel)
|
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{
|
s.towerClientMgr, err = wtclient.NewManager(&wtclient.Config{
|
||||||
FetchClosedChannel: fetchClosedChannel,
|
FetchClosedChannel: fetchClosedChannel,
|
||||||
BuildBreachRetribution: buildBreachRetribution,
|
BuildBreachRetribution: buildBreachRetribution,
|
||||||
@@ -1574,7 +1581,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
|||||||
MinBackoff: 10 * time.Second,
|
MinBackoff: 10 * time.Second,
|
||||||
MaxBackoff: 5 * time.Minute,
|
MaxBackoff: 5 * time.Minute,
|
||||||
MaxTasksInMemQueue: cfg.WtClient.MaxTasksInMemQueue,
|
MaxTasksInMemQueue: cfg.WtClient.MaxTasksInMemQueue,
|
||||||
}, policy, anchorPolicy)
|
}, policy, anchorPolicy, taprootPolicy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user