mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-12 14:12:27 +02:00
lnrpc: provide hop hints when adding an invoice with no amount
With this change we allow adding hop hints when adding an invoice, even if its amount is zero. A couple of new unit test case have been added, and the `testInvoiceRoutingHints` itest was expanded to account for this scenario.
This commit is contained in:
@ -1233,6 +1233,15 @@ func testInvoiceRoutingHints(net *lntest.NetworkHarness, t *harnessTest) {
|
||||
}
|
||||
checkInvoiceHints(invoice)
|
||||
|
||||
// Create another invoice for Alice with no value and ensure it still
|
||||
// populates routing hints.
|
||||
invoice = &lnrpc.Invoice{
|
||||
Memo: "routing hints with no amount",
|
||||
Value: 0,
|
||||
Private: true,
|
||||
}
|
||||
checkInvoiceHints(invoice)
|
||||
|
||||
// Now that we've confirmed the routing hints were added correctly, we
|
||||
// can close all the channels and shut down all the nodes created.
|
||||
closeChannelAndAssert(t, net, net.Alice, chanPointBob, false)
|
||||
|
Reference in New Issue
Block a user