mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-11 06:37:21 +01:00
routing: pass BlindedPaymentPathSet around everywhere
Building on from the previous commit, here we pass the PathSet around everywhere where we previously passed around the single BlindedPayment.
This commit is contained in:
@@ -2223,11 +2223,6 @@ func TestNewRouteRequest(t *testing.T) {
|
||||
finalExpiry: unblindedCltv,
|
||||
err: ErrExpiryAndBlinded,
|
||||
},
|
||||
{
|
||||
name: "invalid blinded payment",
|
||||
blindedPayment: &BlindedPayment{},
|
||||
err: ErrNoBlindedPath,
|
||||
},
|
||||
}
|
||||
|
||||
for _, testCase := range testCases {
|
||||
@@ -2236,9 +2231,19 @@ func TestNewRouteRequest(t *testing.T) {
|
||||
t.Run(testCase.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
var blindedPathInfo *BlindedPaymentPathSet
|
||||
if testCase.blindedPayment != nil {
|
||||
blindedPathInfo, err = NewBlindedPaymentPathSet(
|
||||
[]*BlindedPayment{
|
||||
testCase.blindedPayment,
|
||||
},
|
||||
)
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
req, err := NewRouteRequest(
|
||||
source, testCase.target, 1000, 0, nil, nil,
|
||||
testCase.routeHints, testCase.blindedPayment,
|
||||
testCase.routeHints, blindedPathInfo,
|
||||
testCase.finalExpiry,
|
||||
)
|
||||
require.ErrorIs(t, err, testCase.err)
|
||||
|
||||
Reference in New Issue
Block a user