mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 15:11:09 +02:00
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:
@@ -761,7 +761,8 @@ func (p *paymentLifecycle) amendFirstHopData(rt *route.Route) error {
|
||||
// and apply its side effects to the UpdateAddHTLC message.
|
||||
result, err := fn.MapOptionZ(
|
||||
p.router.cfg.TrafficShaper,
|
||||
func(ts TlvTrafficShaper) fn.Result[extraDataRequest] {
|
||||
//nolint:ll
|
||||
func(ts htlcswitch.AuxTrafficShaper) fn.Result[extraDataRequest] {
|
||||
newAmt, newRecords, err := ts.ProduceHtlcExtraData(
|
||||
rt.TotalAmount, p.firstHopCustomRecords,
|
||||
)
|
||||
@@ -774,7 +775,7 @@ func (p *paymentLifecycle) amendFirstHopData(rt *route.Route) error {
|
||||
return fn.Err[extraDataRequest](err)
|
||||
}
|
||||
|
||||
log.Debugf("TLV traffic shaper returned custom "+
|
||||
log.Debugf("Aux traffic shaper returned custom "+
|
||||
"records %v and amount %d msat for HTLC",
|
||||
spew.Sdump(newRecords), newAmt)
|
||||
|
||||
|
Reference in New Issue
Block a user