Merge pull request #10001 from yyforyongyu/finalize-stfu

Enable quiescence in production and add timeout config
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2025-07-09 19:01:48 -07:00
commit 4fef0f4d7a
12 files changed
+211 -26

No files matched your search

+7 -1
View File
@@ -297,6 +297,12 @@ type ChannelLinkConfig struct {
// AuxTrafficShaper is an optional auxiliary traffic shaper that can be
// used to manage the bandwidth of the link.
AuxTrafficShaper fn.Option[AuxTrafficShaper]
// QuiescenceTimeout is the max duration that the channel can be
// quiesced. Any dependent protocols (dynamic commitments, splicing,
// etc.) must finish their operations under this timeout value,
// otherwise the node will disconnect.
QuiescenceTimeout time.Duration
}
// channelLink is the service which drives a channel's commitment update
@@ -493,7 +499,7 @@ func NewChannelLink(cfg ChannelLinkConfig,
sendMsg: func(s lnwire.Stfu) error {
return cfg.Peer.SendMessage(false, &s)
},
timeoutDuration: defaultQuiescenceTimeout,
timeoutDuration: cfg.QuiescenceTimeout,
onTimeout: func() {
cfg.Peer.Disconnect(ErrQuiescenceTimeout)
},