multi: add new config QuiescenceTimeout

This commit makes removes the `defaultQuiescenceTimeout` and makes it
configurable as different nodes have different network environment. In
addition the default timeout has been increased from 30s to 60s.
This commit is contained in:
yyforyongyu committed 2025-07-04 04:19:59 +08:00
1 parent 8a03414190
commit 127b0e9f41
7 files changed
+37 -7

No files matched your search

+8 -1
View File
@@ -438,6 +438,12 @@ type Config struct {
// should have the quiescence feature disabled.
DisallowQuiescence bool
// 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
// MaxFeeExposure limits the number of outstanding fees in a channel.
// This value will be passed to created links.
MaxFeeExposure lnwire.MilliSatoshi
@@ -1449,7 +1455,8 @@ func (p *Brontide) addLink(chanPoint *wire.OutPoint,
ShouldFwdExpEndorsement: p.cfg.ShouldFwdExpEndorsement,
DisallowQuiescence: p.cfg.DisallowQuiescence ||
!p.remoteFeatures.HasFeature(lnwire.QuiescenceOptional),
AuxTrafficShaper: p.cfg.AuxTrafficShaper,
AuxTrafficShaper: p.cfg.AuxTrafficShaper,
QuiescenceTimeout: p.cfg.QuiescenceTimeout,
}
// Before adding our new link, purge the switch of any pending or live