Skip to content

Commit 1e15efc

Browse files
authored
Merge pull request #10439 from ziggie1984/bugfix/probing
Always add the payment address when probing an invoice
2 parents 3d7ff86 + ac30443 commit 1e15efc

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
@@ -46,6 +46,11 @@
4646
issue](https://github.com/lightningnetwork/lnd/pull/10428) in LND which might
4747
happen when running postgres with a limited number of connections configured.
4848

49+
* [Add missing payment address/secret when probing an
50+
invoice](https://github.com/lightningnetwork/lnd/pull/10439). This makes sure
51+
the EstimateRouteFee API can probe Eclair and LDK nodes which enforce the
52+
payment address/secret.
53+
4954
# New Features
5055

5156
## 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)