multi: thread through and use AuxTrafficShaper

This commit is contained in:
Oliver Gugger
2024-12-04 12:03:55 +01:00
parent 662049681d
commit 72b4a1cb34
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
@@ -1319,6 +1323,7 @@ func (p *Brontide) addLink(chanPoint *wire.OutPoint,
PreviouslySentShutdown: shutdownMsg,
DisallowRouteBlinding: p.cfg.DisallowRouteBlinding,
MaxFeeExposure: p.cfg.MaxFeeExposure,
AuxTrafficShaper: p.cfg.AuxTrafficShaper,
}
// Before adding our new link, purge the switch of any pending or live