Skip to content

Commit c391430

Browse files
GeorgeTsagkguggero
authored andcommitted
lnd: use impl cfg TlvTrafficShaper
1 parent f04fa54 commit c391430

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

config_builder.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import (
4444
"github.com/lightningnetwork/lnd/lnwallet/rpcwallet"
4545
"github.com/lightningnetwork/lnd/macaroons"
4646
"github.com/lightningnetwork/lnd/msgmux"
47+
"github.com/lightningnetwork/lnd/routing"
4748
"github.com/lightningnetwork/lnd/rpcperms"
4849
"github.com/lightningnetwork/lnd/signal"
4950
"github.com/lightningnetwork/lnd/sqldb"
@@ -159,6 +160,10 @@ type AuxComponents struct {
159160
// channels to fetch+store various data.
160161
AuxLeafStore fn.Option[lnwallet.AuxLeafStore]
161162

163+
// TrafficShaper is an optional traffic shaper that can be used to
164+
// control the outgoing channel of a payment.
165+
TrafficShaper fn.Option[routing.TlvTrafficShaper]
166+
162167
// MsgRouter is an optional message router that if set will be used in
163168
// place of a new blank default message router.
164169
MsgRouter fn.Option[msgmux.Router]

server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
10221022
Clock: clock.NewDefaultClock(),
10231023
ApplyChannelUpdate: s.graphBuilder.ApplyChannelUpdate,
10241024
ClosedSCIDs: s.fetchClosedChannelSCIDs(),
1025+
TrafficShaper: implCfg.TrafficShaper,
10251026
})
10261027
if err != nil {
10271028
return nil, fmt.Errorf("can't create router: %w", err)

0 commit comments

Comments
 (0)