Skip to content

Commit fcbd1e1

Browse files
committed
lnwallet+itest: fix PaymentDescriptor creation for blinded path htlc
This commit fixes the instantiation of the BlindingPoint member of PaymentDescriptor during the conversion from persisted LogUpdates. Previously, the blinding point was not set correctly. The test from the previous commit is also updated to now assert that this behaviour is now correct.
1 parent 58fa379 commit fcbd1e1

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

itest/lnd_route_blinding_test.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,10 +1432,6 @@ func testMPPToMultipleBlindedPaths(ht *lntest.HarnessTest) {
14321432
// a blinded path payment since this adds a new blinding point field to
14331433
// UpdateAddHTLC which we need to ensure gets included in the message on
14341434
// restart.
1435-
//
1436-
// NOTE: this first version of this test asserts that this fails. This is to
1437-
// demonstrate that a bug exists in the reloading and forwarding code. This will
1438-
// be fixed in a following commit.
14391435
func testBlindedPaymentHTLCReForward(ht *lntest.HarnessTest) {
14401436
// Setup a test case.
14411437
ctx, testCase := newBlindedForwardTest(ht)
@@ -1456,9 +1452,6 @@ func testBlindedPaymentHTLCReForward(ht *lntest.HarnessTest) {
14561452
}
14571453

14581454
// In a goroutine, we let Alice pay the invoice from dave.
1459-
//
1460-
// NOTE: for now, we assert that this attempt fails. Once the noted bug
1461-
// is fixed, this will be changed to a success assertion.
14621455
done := make(chan struct{})
14631456
go func() {
14641457
defer close(done)
@@ -1468,7 +1461,7 @@ func testBlindedPaymentHTLCReForward(ht *lntest.HarnessTest) {
14681461
)
14691462
require.NoError(testCase.ht, err)
14701463
require.Equal(
1471-
testCase.ht, lnrpc.HTLCAttempt_FAILED,
1464+
testCase.ht, lnrpc.HTLCAttempt_SUCCEEDED,
14721465
htlcAttempt.Status,
14731466
)
14741467
}()

lnwallet/channel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func PayDescsFromRemoteLogUpdates(chanID lnwire.ShortChannelID, height uint64,
205205
Height: height,
206206
Index: uint16(i),
207207
},
208-
BlindingPoint: pd.BlindingPoint,
208+
BlindingPoint: wireMsg.BlindingPoint,
209209
}
210210
pd.OnionBlob = make([]byte, len(wireMsg.OnionBlob))
211211
copy(pd.OnionBlob[:], wireMsg.OnionBlob[:])

0 commit comments

Comments
 (0)