Skip to content

Commit b0852a2

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 9ac8e67 commit b0852a2

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
@@ -1428,10 +1428,6 @@ func testMPPToMultipleBlindedPaths(ht *lntest.HarnessTest) {
14281428
// a blinded path payment since this adds a new blinding point field to
14291429
// UpdateAddHTLC which we need to ensure gets included in the message on
14301430
// restart.
1431-
//
1432-
// NOTE: this first version of this test asserts that this fails. This is to
1433-
// demonstrate that a bug exists in the reloading and forwarding code. This will
1434-
// be fixed in a following commit.
14351431
func testBlindedPaymentHTLCReForward(ht *lntest.HarnessTest) {
14361432
// Setup a test case.
14371433
ctx, testCase := newBlindedForwardTest(ht)
@@ -1452,9 +1448,6 @@ func testBlindedPaymentHTLCReForward(ht *lntest.HarnessTest) {
14521448
}
14531449

14541450
// In a goroutine, we let Alice pay the invoice from dave.
1455-
//
1456-
// NOTE: for now, we assert that this attempt fails. Once the noted bug
1457-
// is fixed, this will be changed to a success assertion.
14581451
done := make(chan struct{})
14591452
go func() {
14601453
defer close(done)
@@ -1464,7 +1457,7 @@ func testBlindedPaymentHTLCReForward(ht *lntest.HarnessTest) {
14641457
)
14651458
require.NoError(testCase.ht, err)
14661459
require.Equal(
1467-
testCase.ht, lnrpc.HTLCAttempt_FAILED,
1460+
testCase.ht, lnrpc.HTLCAttempt_SUCCEEDED,
14681461
htlcAttempt.Status,
14691462
)
14701463
}()

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)