mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-30 15:40:59 +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:
@@ -170,7 +170,7 @@ func createTestCtxFromGraphInstanceAssumeValid(t *testing.T,
|
||||
Clock: clock.NewTestClock(time.Unix(1, 0)),
|
||||
ApplyChannelUpdate: graphBuilder.ApplyChannelUpdate,
|
||||
ClosedSCIDs: mockClosedSCIDs,
|
||||
TrafficShaper: fn.Some[TlvTrafficShaper](
|
||||
TrafficShaper: fn.Some[htlcswitch.AuxTrafficShaper](
|
||||
&mockTrafficShaper{},
|
||||
),
|
||||
})
|
||||
@@ -2206,8 +2206,10 @@ func TestSendToRouteSkipTempErrSuccess(t *testing.T) {
|
||||
NextPaymentID: func() (uint64, error) {
|
||||
return 0, nil
|
||||
},
|
||||
ClosedSCIDs: mockClosedSCIDs,
|
||||
TrafficShaper: fn.Some[TlvTrafficShaper](&mockTrafficShaper{}),
|
||||
ClosedSCIDs: mockClosedSCIDs,
|
||||
TrafficShaper: fn.Some[htlcswitch.AuxTrafficShaper](
|
||||
&mockTrafficShaper{},
|
||||
),
|
||||
}}
|
||||
|
||||
// Register mockers with the expected method calls.
|
||||
@@ -2291,8 +2293,10 @@ func TestSendToRouteSkipTempErrNonMPP(t *testing.T) {
|
||||
NextPaymentID: func() (uint64, error) {
|
||||
return 0, nil
|
||||
},
|
||||
ClosedSCIDs: mockClosedSCIDs,
|
||||
TrafficShaper: fn.Some[TlvTrafficShaper](&mockTrafficShaper{}),
|
||||
ClosedSCIDs: mockClosedSCIDs,
|
||||
TrafficShaper: fn.Some[htlcswitch.AuxTrafficShaper](
|
||||
&mockTrafficShaper{},
|
||||
),
|
||||
}}
|
||||
|
||||
// Expect an error to be returned.
|
||||
@@ -2347,8 +2351,10 @@ func TestSendToRouteSkipTempErrTempFailure(t *testing.T) {
|
||||
NextPaymentID: func() (uint64, error) {
|
||||
return 0, nil
|
||||
},
|
||||
ClosedSCIDs: mockClosedSCIDs,
|
||||
TrafficShaper: fn.Some[TlvTrafficShaper](&mockTrafficShaper{}),
|
||||
ClosedSCIDs: mockClosedSCIDs,
|
||||
TrafficShaper: fn.Some[htlcswitch.AuxTrafficShaper](
|
||||
&mockTrafficShaper{},
|
||||
),
|
||||
}}
|
||||
|
||||
// Create the error to be returned.
|
||||
@@ -2431,8 +2437,10 @@ func TestSendToRouteSkipTempErrPermanentFailure(t *testing.T) {
|
||||
NextPaymentID: func() (uint64, error) {
|
||||
return 0, nil
|
||||
},
|
||||
ClosedSCIDs: mockClosedSCIDs,
|
||||
TrafficShaper: fn.Some[TlvTrafficShaper](&mockTrafficShaper{}),
|
||||
ClosedSCIDs: mockClosedSCIDs,
|
||||
TrafficShaper: fn.Some[htlcswitch.AuxTrafficShaper](
|
||||
&mockTrafficShaper{},
|
||||
),
|
||||
}}
|
||||
|
||||
// Create the error to be returned.
|
||||
@@ -2519,8 +2527,10 @@ func TestSendToRouteTempFailure(t *testing.T) {
|
||||
NextPaymentID: func() (uint64, error) {
|
||||
return 0, nil
|
||||
},
|
||||
ClosedSCIDs: mockClosedSCIDs,
|
||||
TrafficShaper: fn.Some[TlvTrafficShaper](&mockTrafficShaper{}),
|
||||
ClosedSCIDs: mockClosedSCIDs,
|
||||
TrafficShaper: fn.Some[htlcswitch.AuxTrafficShaper](
|
||||
&mockTrafficShaper{},
|
||||
),
|
||||
}}
|
||||
|
||||
// Create the error to be returned.
|
||||
|
Reference in New Issue
Block a user