multi: thread through and use AuxTrafficShaper

This commit is contained in:
Oliver Gugger
2024-12-04 12:03:55 +01:00
parent a2e78c3984
commit 86b3be71fe
3 changed files with 41 additions and 1 deletions

View File

@@ -400,6 +400,10 @@ type Config struct {
// way contracts are resolved.
AuxResolver fn.Option[lnwallet.AuxContractResolver]
// AuxTrafficShaper is an optional auxiliary traffic shaper that can be
// used to manage the bandwidth of peer links.
AuxTrafficShaper fn.Option[htlcswitch.AuxTrafficShaper]
// PongBuf is a slice we'll reuse instead of allocating memory on the
// heap. Since only reads will occur and no writes, there is no need
// for any synchronization primitives. As a result, it's safe to share
@@ -1330,6 +1334,7 @@ func (p *Brontide) addLink(chanPoint *wire.OutPoint,
ShouldFwdExpEndorsement: p.cfg.ShouldFwdExpEndorsement,
DisallowQuiescence: p.cfg.DisallowQuiescence ||
!p.remoteFeatures.HasFeature(lnwire.QuiescenceOptional),
AuxTrafficShaper: p.cfg.AuxTrafficShaper,
}
// Before adding our new link, purge the switch of any pending or live