Skip to content

Commit eceaadc

Browse files
authored
Merge pull request #10445 from lightningnetwork/backport-10439-to-v0.20.x-branch
[v0.20.x-branch] Backport #10439: Always add the payment address when probing an invoice
2 parents 07b8452 + f82c35c commit eceaadc

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

docs/release-notes/release-notes-0.20.1.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@
6464
due to validation checks in the graph Builder that were resurfaced after the
6565
graph refactor work.
6666

67+
* [Add missing payment address/secret when probing an
68+
invoice](https://github.com/lightningnetwork/lnd/pull/10439). This makes sure
69+
the EstimateRouteFee API can probe Eclair and LDK nodes which enforce the
70+
payment address/secret.
71+
6772
# New Features
6873

6974
## Functional Enhancements

lnrpc/routerrpc/router_server.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ func (s *Server) probePaymentRequest(ctx context.Context, paymentRequest string,
557557
// If the payment addresses is specified, then we'll also populate that
558558
// now as well.
559559
payReq.PaymentAddr.WhenSome(func(addr [32]byte) {
560+
probeRequest.PaymentAddr = make([]byte, lntypes.HashSize)
560561
copy(probeRequest.PaymentAddr, addr[:])
561562
})
562563

@@ -624,6 +625,10 @@ func (s *Server) probePaymentRequest(ctx context.Context, paymentRequest string,
624625

625626
// Copy the payment address if present.
626627
if len(probeRequest.PaymentAddr) > 0 {
628+
lspProbeRequest.PaymentAddr = make(
629+
[]byte, lntypes.HashSize,
630+
)
631+
627632
copy(
628633
lspProbeRequest.PaymentAddr,
629634
probeRequest.PaymentAddr,

0 commit comments

Comments
 (0)