Skip to content

Commit 670fca4

Browse files
committed
routerrpc: reject invoices without payment secret or blinded paths
Ensure that a payment is only sent if the invoice includes either a payment address (payment secret) or at least one blinded path.
1 parent c9fe051 commit 670fca4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

docs/release-notes/release-notes-0.20.0.md

+4
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@
6363
# Technical and Architectural Updates
6464
## BOLT Spec Updates
6565

66+
* [Required invoices to include a payment address or blinded paths](https://github.com/lightningnetwork/lnd/pull/9752) to comply with updated BOLT specifications before accepting payments.
67+
6668
## Testing
6769

6870
## Database
@@ -72,3 +74,5 @@
7274
## Tooling and Documentation
7375

7476
# Contributors (Alphabetical Order)
77+
78+
Erick Cestari

lnrpc/routerrpc/router_backend.go

+5
Original file line numberDiff line numberDiff line change
@@ -985,6 +985,11 @@ func (r *RouterBackend) extractIntentFromSendRequest(
985985
return nil, err
986986
}
987987

988+
if payReq.PaymentAddr.IsNone() && len(payReq.BlindedPaymentPaths) == 0 {
989+
return nil, errors.New("payment request must contain " +
990+
"either a payment address or blinded paths")
991+
}
992+
988993
// If the amount was not included in the invoice, then we let
989994
// the payer specify the amount of satoshis they wish to send.
990995
// We override the amount to pay with the amount provided from

0 commit comments

Comments
 (0)