multi: move routing.TlvTrafficShaper => htlcswitch.AuxTrafficShaper

With this commit we move the traffic shaper definition from the routing
package to the HTLC switch package as a preparation for being able to
use it there as well.
At the same time we rename it to AuxTrafficShaper to be more in line
with the other auxiliary components.
This commit is contained in:
Oliver Gugger committed 2024-12-05 12:39:33 +01:00
1 parent fa309c9a0e
commit 117c6bc781
12 files changed
+167 -99

No files matched your search

+3 -1
View File
@@ -4,6 +4,7 @@ import (
"github.com/btcsuite/btcd/btcec/v2"
"github.com/lightningnetwork/lnd/fn"
"github.com/lightningnetwork/lnd/graph/db/models"
"github.com/lightningnetwork/lnd/htlcswitch"
"github.com/lightningnetwork/lnd/lnwire"
"github.com/lightningnetwork/lnd/routing/route"
"github.com/lightningnetwork/lnd/tlv"
@@ -52,7 +53,8 @@ type SessionSource struct {
// payment's destination.
func (m *SessionSource) NewPaymentSession(p *LightningPayment,
firstHopBlob fn.Option[tlv.Blob],
trafficShaper fn.Option[TlvTrafficShaper]) (PaymentSession, error) {
trafficShaper fn.Option[htlcswitch.AuxTrafficShaper]) (PaymentSession,
error) {
getBandwidthHints := func(graph Graph) (bandwidthHints, error) {
return newBandwidthManager(