lnd: use impl cfg TlvTrafficShaper

This commit is contained in:
George Tsagkarelis 2024-04-19 14:00:34 +02:00 committed by Oliver Gugger
parent 57e975be6d
commit d0e41b4409
No known key found for this signature in database
GPG Key ID: 8E4256593F177720
2 changed files with 8 additions and 0 deletions

View File

@ -46,6 +46,7 @@ import (
"github.com/lightningnetwork/lnd/lnwallet/rpcwallet"
"github.com/lightningnetwork/lnd/macaroons"
"github.com/lightningnetwork/lnd/protofsm"
"github.com/lightningnetwork/lnd/routing"
"github.com/lightningnetwork/lnd/rpcperms"
"github.com/lightningnetwork/lnd/signal"
"github.com/lightningnetwork/lnd/sqldb"
@ -151,6 +152,12 @@ type ImplementationCfg struct {
// AuxComponents is a set of auxiliary components that can be used by
// lnd for certain custom channel types.
AuxComponents
TlvTrafficShaper
}
type TlvTrafficShaper struct {
TrafficShaper fn.Option[routing.TlvTrafficShaper]
}
// AuxComponents is a set of auxiliary components that can be used by lnd for

View File

@ -990,6 +990,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
Clock: clock.NewDefaultClock(),
StrictZombiePruning: strictPruning,
IsAlias: aliasmgr.IsAlias,
TrafficShaper: implCfg.TrafficShaper,
})
if err != nil {
return nil, fmt.Errorf("can't create router: %w", err)