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:
3 files changed
+106
-4
No files matched your search
@@ -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